nerdexam
Salesforce

PDII · Question #374

Universal Containers has an Apex trigger on Account that creates an Account Plan record when an Account is marked as a Customer. Recently a record-triggered flow was added so that whenever an…

The correct answer is C. The Apex trigger does not use a static variable to ensure it only fires once. See the full explanation below for the reasoning.

Question

Universal Containers has an Apex trigger on Account that creates an Account Plan record when an Account is marked as a Customer. Recently a record-triggered flow was added so that whenever an Account is marked as a Customer, a 'Customer Since' date field is updated with today's date. Since the addition of the flow, two Account Plan records are created whenever the Account is marked as a Customer. What might cause this to happen?

Options

  • AThe flow is configured to evaluate when a record is created and every time it is edited.
  • BThe Apex trigger is not bulk safe and calls insert inside of a for loop.
  • CThe Apex trigger does not use a static variable to ensure it only fires once.
  • DThe flow is configured to use an 'Update Records' element.

How the community answered

(23 responses)
  • A
    9% (2)
  • B
    4% (1)
  • C
    70% (16)
  • D
    17% (4)

Community Discussion

No community discussion yet for this question.

Full PDII Practice