Last active
August 29, 2015 14:25
-
-
Save adtennant/abc744cc2e6a785e908f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Account { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Account anAccount = new Account(); | |
account.Name = 'Test'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class checkRecursive { | |
private static boolean run = true; | |
public static boolean runOnce() { | |
if(run) { | |
run = false; | |
return true; | |
} else { | |
return run; | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trigger updateTrigger on anyObject(after update) { | |
if(checkRecursive.runOnce()) { | |
// write your code here | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trigger updateTrigger on anyObject(after update) { | |
static Boolean run = true; | |
if(run) { | |
run = false; | |
// write your code here | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment