Salesforce Decode
Salesforcedecode
Apex questionsQuestion 66 of 179
ApexAdvancedbulkificationtriggersrecursion

Prevent trigger recursion when rollup updates cascade across five related objects

Scenario

Opportunity line item trigger updates Opportunity, which updates Account rollup, which fires Account trigger updating child Contacts, causing MAXIMUM_TRIGGER_DEPTH exceeded during bulk order import.

Answer it out loud first

Serious prep means attempting before reading. Take two minutes to structure your answer, then compare.