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
:) :) :) :) :):) :) :) :) :) 

Trigger recursion depth

I don't find anything in limit class that gives current trigger depth. Is it possible to get current trigger depth using trigger context variable or any other way? 
Amit Chaudhary 8Amit Chaudhary 8
if you want to stop the recusive trigger issue please check below post. I hope that will help you
http://amitsalesforce.blogspot.in/2015/03/how-to-stop-recursive-trigger-in.html



Solution :-
you can create a class with a static Boolean variable with default value true. In the trigger, before executing your code keep a check that the variable is true or not. Once you check make the variable false.