OrgReady

Salesforce Skills & Readiness

Back to Practice
Apex TriggerDebuggingHard

Interview Challenge

Fix Recursive Trigger Re-entry

Debug an Account trigger that performs an update on the same records that caused the trigger to execute.

You can explore this challenge without signing in.

Read the problem, review the starter code and try your solution. Sign in when you're ready to submit and save your progress.

Challenge

Version 1

Inspect the evidence

Artifact / implementation

Review the supplied code, configuration or trace before proposing a fix.

trigger AccountTrigger on Account (after update) {
    List<Account> accountsToUpdate = new List<Account>();

    for (Account acc : Trigger.new) {
        acc.Description = 'Processed';
        accountsToUpdate.add(acc);
    }

    update accountsToUpdate;
}

Response workspace

Identify the issue, explain why it is a problem, and describe the fix. Include both your analysis and corrected solution below.

0 analysis characters

0 solution characters