SALESFORCE-PD1 Process Automation And Logic Practice Question
A developer is troubleshooting an Apex trigger recursion issue where an update operation triggers itself infinitely. Which THREE strategies can the developer use to safely prevent this recursion? Choose 3 options.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Utilize Custom Settings or Custom Metadata to provide a global toggle to turn off triggers dynamically.
Trigger recursion can be prevented using static boolean flags in a helper class, utilizing trigger context maps to check if specific fields actually changed, or leveraging custom metadata/settings to disable triggers dynamically.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Call Limits.getQueries() at the start of every trigger to abort if limits are near.
Why it's wrong here
Checking query limits does not prevent trigger recursion; it only monitors SOQL consumption.
- ✓
Utilize Custom Settings or Custom Metadata to provide a global toggle to turn off triggers dynamically.
Why this is correct
Dynamic kill-switches allow administrators or developers to disable faulty or recursive triggers instantly.
- ✗
Wrap all DML statements in a try-catch block that catches recursion exceptions.
Why it's wrong here
Recursion does not throw a specific catchable exception; it hits maximum trigger depth or CPU/stack depth limits.
- ✓
Compare old and new field values using Trigger.oldMap and Trigger.newMap to check if relevant fields actually changed.
Why this is correct
Checking if fields have changed prevents unnecessary executions when unrelated fields are updated.
- ✓
Use a static boolean variable in a helper class set to false after the first execution.
Why this is correct
Static variables persist for the duration of the request transaction and can block recursive trigger entries.
About these practice questions
One of 488 original SALESFORCE-PD1 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed August 2026 · checked against the official Salesforce exam blueprint
This SALESFORCE-PD1 practice question is part of Courseiva's free Salesforce certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SALESFORCE-PD1 exam.