Salesforce
PDII · Question #341
The Account object has a field, Audit_Code__c, that is used to specify what type of auditing the Account needs and a Lookup to User, Auditor__c, that is the assigned auditor. When an Account is…
The correct answer is B. Add a WHERE clause to the SOQL query to filter on audit codes. C. Build a Map> of audit code to accounts. See the full explanation below for the reasoning.
Question
The Account object has a field, Audit_Code__c, that is used to specify what type of auditing the Account needs and a Lookup to User, Auditor__c, that is the assigned auditor. When an Account is initially created, the user specifies the Audit_Code__c. Each User in the org has a unique text field, Audit_Code_c, that is used to automatically assign the correct user to the Account's Auditor__c field. What should be changed to most optimize the code's efficiency? (Choose two.)
Exhibit
Options
- AAdd an initial SOQL query to get all distinct audit codes.
- BAdd a WHERE clause to the SOQL query to filter on audit codes.
- CBuild a Map> of audit code to accounts.
- DBuild a Map> of Account Id to audit codes.
How the community answered
(33 responses)- A9% (3)
- B76% (25)
- D15% (5)
Community Discussion
No community discussion yet for this question.
