function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SuredreamSuredream 

Workflow rule with evaluation criteria as '..edited to subsequently meet the criteria' is firing second time

Hello all,

I have created a workflow with evaluation criteria as 'Evaluate the rule when a record is created and any time its edited to subsequently meet criteria' and entry criteria as Case Status = 'A'.. It has below actions:
--> Immediate action - update Notification Date as today()+2 days
--> Time based action - close the case 2 days after Notification Date.

Below is the issue I am facing:
Created a case with Account field as blank and updated case status to 'A'. 
The workflow rule has fired. It has set the Notification Date as today()+2 and created an entry  in the Time based workflow monitoring queue (Scheduled date as today()+4 days). 

One day later, I have updated the Account field on Case record to some non blank value. Now the Notification Date looks to be extended by 1 day and the scheduled time based action also got extended by 1 day.  Ideally it should not have happened since there is no change in Case Status. The case record has continued to have the status as A.

I have turned off the apex trigger on Case object and the issue did not happen. Did someone face this kind of issue?
Best Answer chosen by Suredream
SuredreamSuredream
Never mind...found the root cause from salesforce documentation: 
"Workflow rules are triggered when a standard or custom object in a master-detail relationship is re-parented, even if the object's evaluation criteria is set to Evaluate the rule when a record is: created, and any time it’s edited to subsequently meet criteria."
Reference:
https://help.salesforce.com/articleView?id=workflow_rules_considerations.htm&type=5

All Answers

Danish HodaDanish Hoda
Hi there,
I am unable to get as to how you created a time-based WF rule with the criteria Evaluate the rule when a record is: created, and any time it’s edited to subsequently meet criteria.

As you are saying, this did not happen when Case rigger was de-activated, this means the same logic runs on before Update on Case object which needs to be removed from the trigger.
SuredreamSuredream
Never mind...found the root cause from salesforce documentation: 
"Workflow rules are triggered when a standard or custom object in a master-detail relationship is re-parented, even if the object's evaluation criteria is set to Evaluate the rule when a record is: created, and any time it’s edited to subsequently meet criteria."
Reference:
https://help.salesforce.com/articleView?id=workflow_rules_considerations.htm&type=5
This was selected as the best answer