+ Start a Discussion
Cody WhiteCody White 

Workflow triggering twice

Hello, 
I am currently having an issue with workflow and was hoping you can help me out. I need a way to make it stop triggering once those tasks have already been created once. 

I currently have a workflow set to trigger a set of tasks as follows:
created, and every time it’s edited
AND( 
ISPICKVAL( StageName , "Pilot Implementation Pending"), 
NOT( ISPICKVAL( PRIORVALUE(StageName) , "Pilot Passed Back For Assistance") ))&& ( Account.Owner.UserRole.Name = "Implementation Team")


Any help would be greatfully appreciated. 
Best Answer chosen by Cody White
Clint Majors (Personal)Clint Majors (Personal)
Do you only want this workflow to be triggered once per Opportunity? If so, you could add a custom field to Opportunity of type checkbox (do not add it to the UI) and set it to checked/true when the workflow runs. Then, you could add logic to the workflow rule to make sure that box is not checked.

All Answers

Clint Majors (Personal)Clint Majors (Personal)
Do you only want this workflow to be triggered once per Opportunity? If so, you could add a custom field to Opportunity of type checkbox (do not add it to the UI) and set it to checked/true when the workflow runs. Then, you could add logic to the workflow rule to make sure that box is not checked.
This was selected as the best answer
Amit Chaudhary 8Amit Chaudhary 8
There are two option to do that

Option 1:- If that is field update then make sure "Re-evaluate Workflow Rules after Field Change" check box should be false.
Option 2:- If your trigger is executing two time please check below post. I hope that will help you
http://amitsalesforce.blogspot.in/2015/03/how-to-stop-recursive-trigger-in.html

Please check order or execution to under stand the flow
http://amitsalesforce.blogspot.in/2015/01/triggers-and-order-of-execution.html

Please let us know if this will help you

Thanks
Amit Chaudhary
Laura Walker 7Laura Walker 7
Or you could run the workflow when created and edited to meet the criteria. Then if you tick a checkbox as part of the original workflow and also put that checkbox = blank in the criteria it should only fire once
Cody WhiteCody White
Thank you all so much, everything is working like it's supposed to now.