ApexSensei

Drills Triggers

Stop recursive Account updates

A static variable keeps its value for the whole transaction, so a static Set<Id> can remember which records a trigger already handled.

Your task

Finish afterUpdate so each Account gets :: synced added to its Description once, using one follow-up update.

public class AS_F6172D398608_RecursionGuard {
    private static Set<Id> handledIds = new Set<Id>();

    public static void afterUpdate(List<Account> records) {
        List<Account> followUps = new List<Account>();
        for (Account account : records) {
        }
    }
}

Requirements

  1. appendsOneMarker should pass
  2. usesTheNewDescription should pass
  3. handlesBlankDescription should pass
  4. guardsEachRecordSeparately should pass
  5. handlesBulkOfTwoHundred should pass

Sign in to open this drill