0

Workflows are triggering twice after field updates are happening. Reevaluate workflows is turned off for all field updates. No specific updates on the record in after update triggers.

Log 1:

12:11:50.450 (2830002851)|CODE_UNIT_FINISHED|OpportunityTrigger on Opportunity trigger event AfterUpdate for [006c000000EPZrw]
12:11:50.450 (2831870864)|WF_FLOW_ACTION_BEGIN|09Lc00000004LRf
12:11:50.831 (2831959097)|FLOW_CREATE_INTERVIEW_BEGIN|00Dc0000003oW7m|30031000000Uc7F|301c00000009l5z
12:11:50.831 (2833786790)|FLOW_CREATE_INTERVIEW_END|618674d44f50b8609c9b57ec3e83153805fc75b-1d52|Opp- popeye Brand
12:11:50.834 (2834059074)|FLOW_START_INTERVIEWS_BEGIN|1
12:11:50.834 (2834535542)|FLOW_START_INTERVIEW_BEGIN|618674d44f50b8609c9b57ec3e83153805fc75b-1d52|Opp- popeye Brand
12:11:50.834 (2838451409)|FLOW_START_INTERVIEW_END|618674d44f50b8609c9b57ec3e83153805fc75b-1d52|Opp- popeye Brand
12:11:50.834 (2838463553)|FLOW_START_INTERVIEWS_END|1
12:11:50.450 (2840241557)|WF_FLOW_ACTION_END|09Lc00000004LRf
12:11:50.450 (2840314231)|WF_RULE_EVAL_BEGIN|Workflow
12:11:50.450 (2840345882)|WF_CRITERIA_BEGIN|[Opportunity: test2- 006c000000EPZrw]|Opportunity - Closed lost notification|01Qi0000000Dzqw|ON_CREATE_OR_TRIGGERING_UPDATE|1
12:11:50.450 (2840491415)|WF_FORMULA|Formula:ENCODED:[treatNullAsNull]{!ID:$User.Id} !=  {!ID:Owner} &&   ISPICKVAL({!ID:StageName},'Closed/Lost') &&  ( {!ID:$Profile.Name} != 'TW Operations' && {!ID:$Profile.Name} != 'TW System Administrator')|Values:OwnerId=005i0000002Wm4V, $Profile.Name=TW System Administrator, StageName=Closed/Won, $User.Id=005i0000004TZoh
12:11:50.450 (2840497613)|WF_CRITERIA_END|false
12:11:50.450 (2840515607)|WF_CRITERIA_BEGIN|[Opportunity: test2- 006c000000EPZrw]|Opportunity - Set Split % SE fields|01Qi0000000Pov3|ON_ALL_CHANGES|1
12:11:50.450 (2840611535)|WF_FORMULA|Formula:ENCODED:[treatNullAsNull]AND (OR( ISNEW()  ,  ISCHANGED( {!ID:00Ni000000CCIln} )  ,  ISCHANGED( {!ID:00Ni000000CCIls} )  ) , {!ID:$User.00Ni000000D662p} = False)|Values:Sales_Engineer__c=005i0000002XRwK, $User.Bypass_Workflow_Rules__c=0, Sales_Engineer_2__c=005i0000002XRwK
12:11:50.450 (2840616329)|WF_CRITERIA_END|false
12:11:50.450 (2840632635)|WF_CRITERIA_BEGIN|[Opportunity: test2- 006c000000EPZrw]|Opportunity - Closed Order Notification-LAC|01Qi0000000Q04O|ON_CREATE_OR_TRIGGERING_UPDATE|1

And in second log, nothing happens after trigger execution ends. Issue is, if there is a process(process builder) active for an object, then after that process is executed(even if criteria in process matches or not), workflows(which doesnt met the criteria before) are triggered again. If no process active, then execution stops and commits the changes to the record

  • any future methods involved? – cropredy Mar 12 '16 at 16:54
  • No.. Its happening when activating a process in Process builder. – Vijay Sagar Mar 16 '16 at 22:10
  • Vijay -- you might need to post some more detail, especially the debug log that shows the Workflows executing twice (don't dump a big log on us; strip it to its essentials) – cropredy Mar 16 '16 at 23:50
  • Sure.. PFA log 1 and log 2. Log 1 shows workflows triggering again after a flow is executed. In log 2, flow was inactivated and workflows were not triggered. – Vijay Sagar Mar 17 '16 at 18:24
  • Okay I cannot post entire log. I will just simplify the log details log 1: Before& after Triggers ->WF updates ->Before and after Triggers -> Process Flow will run(but not do any update) -> Again WF which are not met criteria before will run again with the latest data saved on the record log 2: Before& after Triggers ->WF updates ->Before and after Triggers -> Process bold No flow since it is deactivated -> Execution ends here. – Vijay Sagar Mar 17 '16 at 18:30
0

Log 1:

12:11:50.450 (2830002851)|CODE_UNIT_FINISHED|OpportunityTrigger on Opportunity trigger event AfterUpdate for [006c000000EPZrw] 12:11:50.450 (2831870864)|WF_FLOW_ACTION_BEGIN|09Lc00000004LRf 12:11:50.831 (2831959097)|FLOW_CREATE_INTERVIEW_BEGIN|00Dc0000003oW7m|30031000000Uc7F|301c00000009l5z 12:11:50.831 (2833786790)|FLOW_CREATE_INTERVIEW_END|618674d44f50b8609c9b57ec3e83153805fc75b-1d52|Opp- popeye Brand 12:11:50.834 (2834059074)|FLOW_START_INTERVIEWS_BEGIN|1 12:11:50.834 (2834535542)|FLOW_START_INTERVIEW_BEGIN|618674d44f50b8609c9b57ec3e83153805fc75b-1d52|Opp- popeye Brand 12:11:50.834 (2838451409)|FLOW_START_INTERVIEW_END|618674d44f50b8609c9b57ec3e83153805fc75b-1d52|Opp- popeye Brand 12:11:50.834 (2838463553)|FLOW_START_INTERVIEWS_END|1 12:11:50.450 (2840241557)|WF_FLOW_ACTION_END|09Lc00000004LRf 12:11:50.450 (2840314231)|WF_RULE_EVAL_BEGIN|Workflow 12:11:50.450 (2840345882)|WF_CRITERIA_BEGIN|[Opportunity: test2- 006c000000EPZrw]|Opportunity - Closed lost notification|01Qi0000000Dzqw|ON_CREATE_OR_TRIGGERING_UPDATE|1 12:11:50.450 (2840491415)|WF_FORMULA|Formula:ENCODED:[treatNullAsNull]{!ID:$User.Id} != {!ID:Owner} && ISPICKVAL({!ID:StageName},'Closed/Lost') && ( {!ID:$Profile.Name} != 'TW Operations' && {!ID:$Profile.Name} != 'TW System Administrator')|Values:OwnerId=005i0000002Wm4V, $Profile.Name=TW System Administrator, StageName=Closed/Won, $User.Id=005i0000004TZoh 12:11:50.450 (2840497613)|WF_CRITERIA_END|false 12:11:50.450 (2840515607)|WF_CRITERIA_BEGIN|[Opportunity: test2- 006c000000EPZrw]|Opportunity - Set Split % SE fields|01Qi0000000Pov3|ON_ALL_CHANGES|1 12:11:50.450 (2840611535)|WF_FORMULA|Formula:ENCODED:[treatNullAsNull]AND (OR( ISNEW() , ISCHANGED( {!ID:00Ni000000CCIln} ) , ISCHANGED( {!ID:00Ni000000CCIls} ) ) , {!ID:$User.00Ni000000D662p} = False)|Values:Sales_Engineer__c=005i0000002XRwK, $User.Bypass_Workflow_Rules__c=0, Sales_Engineer_2__c=005i0000002XRwK 12:11:50.450 (2840616329)|WF_CRITERIA_END|false 12:11:50.450 (2840632635)|WF_CRITERIA_BEGIN|[Opportunity: test2- 006c000000EPZrw]|Opportunity - Closed Order Notification-LAC|01Qi0000000Q04O|ON_CREATE_OR_TRIGGERING_UPDATE|1

  • @cropredy : And in second log, nothing happens after trigger execution ends. Issue is, if there is a process(process builder) active for an object, then after that process is executed(even if criteria in process matches or not), workflows(which doesnt met the criteria before) are triggered again. If no process active, then execution stops and commits the changes to the record. – Vijay Sagar Mar 17 '16 at 20:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.