You need to sign in to do that
Don't have an account?

How to prevent Trigger to be fired after workflow field update? Any suggestions on this?
How to prevent Trigger to be fired after workflow field update? Any suggestions on this?
You need to sign in to do that
Don't have an account?
You can't prevent trigger to be fired but you can use a static variable to prevent code to be executed.
Create a static variable in a class and make it true once your before or after trigger has been executed.
Init
inside Trigger
Thanks,
Himanshu
Salesforce Certified Developer | Administrator | Service Cloud Consultant
P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.
Cyrus Talladen
CRM Engineer
www.levementum.com
//Class
Public Class Myclass{
public Static Boolean MyFlag = false;
public static void mymethod(){
....
//set the Boolean Flag to True
MyFlag = True;
...
}
}
//Now write the Trigger for the class
Trigger MyTrigger on Myobject (before insert, after insert...){
//check the flag, if it is false execute the trigger
if(!Myclass.MyFlag){
...
}
}
If this helps, Please mark it as your best answer !
1.Create a field in object of type check.
2. In the same workflow, create a workflow rule , make that varible as true
3. in the trigger put one condition like createdvarible==false then only call the remain logic.
thank you.