I'm using this sample code from Developerforce to avoid recursion in triggers.
public class TriggerMonitor {
private static boolean run = true;
public static boolean runOnce() {
if( run ) {
run = false;
return true;
}
else {
return run;
}
}
}
I'm looking for ideas on how to adopt this to handle multiple triggers? If I go by this code, I'd have to create a distinct class to handle each trigger and that can get quite messy.
Thanks.