You need to sign in to do that
Don't have an account?
Ankur Srivastava
Activating triggers & validation rules programatically
What is the most effective way to activate or inactivate the triggers or validation rules of an sObject programmatically ?
if(boolean__c == true)
{
//do something
}
You have to bascially set the boolean to either true or false based on your requirements. You can use custom settings as well.
Please mark it as best answer if this answers your question. It helps others.