Salesforce Platform Developer I (legacy) — Question 14

How should a developer prevent a recursive trigger?

Answer options

Correct answer: B

Explanation

The correct answer is B because using a static Boolean variable allows the developer to control the execution flow of the trigger and prevent it from running recursively. Options A and C may improve trigger organization or functionality, but they do not directly address recursion. Option D, while useful, does not provide the same level of control as a static variable.