Salesforce
PDII · Question #409
PDII Question #409: Real Exam Question with Answer & Explanation
Sign in or unlock PDII to reveal the answer and full explanation for question #409. The question stem and answer options stay visible for context.
Question
Given a list of Opportunity records named opportunityList, which code snippet is best for querying all Contacts of the Opportunity's Account?
Options
- AList <Contact> contactList = new List <Contact>(); for(Opportunity o : opportunityList){ Account a =
- BList <Contact> contactList = new List <Contact>(); Set <Id> accountIds = new Set <Id> (); for
- CList <Contact> contactList = new List <Contact>(); Set <Id> accountIds = new Set <Id> ();
- DList <Contact> contactList = new List <Contact>(); for ( Contact c : [SELECT Id FROM Contact
Unlock PDII to see the answer
You've previewed enough free PDII questions. Unlock PDII for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.