Skip to content

Instantly share code, notes, and snippets.

@emoran
Created May 29, 2014 20:55
Show Gist options
  • Save emoran/eaf870b9162be330ad96 to your computer and use it in GitHub Desktop.
Save emoran/eaf870b9162be330ad96 to your computer and use it in GitHub Desktop.
public Class checkRecursive
{
private static boolean run = true;
public static boolean runOnce(){
if(run){
run=false;
return true;
}
else
{
return run;
}
}
}
trigger updateTrigger on anyObject(after update) {
if(checkRecursive.runOnce())
{
//write your code here
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment