Salesforce Platform Developer I (legacy) — Question 27
A developer writes a single trigger on the Account object on the after insert and after update events. A workflow rule modifies a field every time an Account is created or updated.
How many times will the trigger fire if a new Account is inserted, assuming no other automation logic is implemented on the Account?
Answer options
- A. 8
- B. 1
- C. 4
- D. 2
Correct answer: D
Explanation
The trigger will execute twice: once during the 'after insert' event and once during the 'after update' event caused by the workflow rule's modification of the field. Other options are incorrect because the trigger does not fire multiple times for a single account creation; it only fires twice in this scenario.