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
Jerun JoseJerun Jose 

Workflow rule gets triggered even if evaluation criteria is not met

 

  1. Create a workflow rule with eval criteria as 'Evaluate the rule when a record is created, and any time it’s edited to subsequently meet criteria' and Rule Criteria is "Case: Status equals New". The value can be anything actually. Set the workflow action to update a field value (for easy inspection)
  2. Update any attribute on the case. Anything but the case contact or the case status. You will notice that workflow was not fired (as expected). Inspecting the debug logs you will see that the WF_RULE_NOT_EVALUATED (again as expected).
  3. Update only case contact. You will now notice that the workflow rule has fired.(This should not be as we have not changed the case status)

I feel this is a bug. Please try it out and tell me if you can explain this.

Jerun JoseJerun Jose
I got an explanation for this behavior in the answers community
https://success.salesforce.com/questionDetail?qid=a1X30000000fMryEAE

I have also posted a suggested solution for this there, but its not robust. Hoping the developer community can help me out here.