nerdexam
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

PDII question #349 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)
  • A
    79% (11)
  • B
    7% (1)
  • C
    14% (2)

Community Discussion

No community discussion yet for this question.

Full PDII Practice