Salesforce
PDII · Question #349
Consider the following code snippet: Which two best practices should the developer implement to optimize this code? (Choose two.)
The correct answer is A. Query the Pricing_Structure__c records outside of the loop. D. Remove the DML statement. See the full explanation below for the reasoning.
Question
Consider the following code snippet:
Which two best practices should the developer implement to optimize this code? (Choose two.)
Exhibit
Options
- AQuery the Pricing_Structure__c records outside of the loop.
- BUse a collection for the DML statement.
- CChange the trigger context to after update, after insert.
- DRemove the DML statement.
How the community answered
(14 responses)- A79% (11)
- B7% (1)
- C14% (2)
Community Discussion
No community discussion yet for this question.
