nerdexam
Salesforce

PDII · Question #312

A developer is working with existing functionality that tracks how many times a stage has changed for an Opportunity. When the Opportunity's stage is changed, a workflow rule is fired to increase…

The correct answer is D. Trigger.old does not contain the updated value of the count field. See the full explanation below for the reasoning.

Question

A developer is working with existing functionality that tracks how many times a stage has changed for an Opportunity. When the Opportunity's stage is changed, a workflow rule is fired to increase the value of a field by one. The developer wrote an after trigger to create a child record when the field changes from 4 to 5. A user changes the stage of an Opportunity and manually sets the count field to 4. The count field updates to 5, but the child record is not created. What is the reason this is happening?

Options

  • AAfter triggers fire before workflow rules.
  • BTrigger.new does not change after a field update.
  • CAfter triggers are not fired after field updates.
  • DTrigger.old does not contain the updated value of the count field.

How the community answered

(27 responses)
  • A
    11% (3)
  • B
    7% (2)
  • C
    4% (1)
  • D
    78% (21)

Community Discussion

No community discussion yet for this question.

Full PDII Practice