Salesforce Platform Developer I (legacy) — Question 43

A developer writes a trigger on the Account object on the before update event that increments a count field. A workflow rule also increments the count field every time that an Account is created or updated. The field update in the workflow rule is configured to not re-evaluate workflow rules.
What is the value of the count field if an Account is inserted with an initial value of zero, assuming no other automation logic is implemented on the Account?

Answer options

Correct answer: D

Explanation

When an Account is inserted, the trigger will run first and increment the count field from 0 to 1. Then, the workflow rule will execute and increment the count field again from 1 to 2. Since the workflow is not set to re-evaluate, it will not further trigger any additional updates. Thus, the final count value will be 2. The other options do not account for the correct sequence of operations.