function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Bhavin Mehta 20Bhavin Mehta 20 

How many times will an Apex Trigger fire recursively?

A) 1
B) 2
C) 3
D) 4
E) 5
V V Satyanarayana MaddipatiV V Satyanarayana Maddipati
Maximum number of times the trigger will fire recursively is 16. After 16 th time it will throw the error "maximum trigger depth exceeded".
Nishad KNishad K
Hi Bhavin,

You can only have something recursively fire 16 times (Max Stack Depth).

This can happen if you have triggers that fire DML updates that fire triggers that in turn update the original record, triggering a recursive loop that doesn't stop.

A Unit Test may pass but its possible if you use SeeAllData or some other test permuatation it could trigger this on some occassions and not others.

Regards,