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
Anthony WheelerAnthony Wheeler 

Workflow runs overtime in Sandbox, but not every time in production.

I have three fields on a custom object:
  1. Enrollment Status(Picklist)
  2. Enrollment Status Reason(Picklist)
  3. Opt Out Date(Date)
and two workflow rules that run on them. The first one sets the Enrollment Status to a value of "Not Enrolled" when the Enrollment Status Reason is changed to equal one of its corresponding reasons. The second one populates the Opt Out Date with today's date when the Enrollment Status field is changed to a value of "Not Enrolled". This works perfectly in the sandbox, but in production, the Opt Out Date only fills in when another random field changes value. The Enrollment Status is filled with "Not Enrolled" regardless. The workflows are identical in the sandbox and in production. I have looked over the debug logs, and it looks like the first rule evaluates to true, and the second rule evaluates to false imediately after. But in the logs where the date was filled in correctly, it looks like the second workflow was evaluated twice. Not sure why this is. I don't want to combine the workflows, because we also want to be able to modify the Opt Out Date manually, and it gets overcomplicated quickly when they're combined. Any help on this would be much appreciated. 
Best Answer chosen by Anthony Wheeler
LakshmanLakshman
It is uncertain that which workflow will get fired first. You need to check the Re-evaluate workflow flag on each of the field updates of you workflow.
Let us know your results.

All Answers

Bhaswanthnaga vivek vutukuriBhaswanthnaga vivek vutukuri
What is the evaluation criteria you have selected for these workflows ?
LakshmanLakshman
It is uncertain that which workflow will get fired first. You need to check the Re-evaluate workflow flag on each of the field updates of you workflow.
Let us know your results.
This was selected as the best answer
Anthony WheelerAnthony Wheeler
The first one was flagged to Re-evaluate, and the second one wasn't in both the sandbox and production. Not sure why it was working every time in the sandbox, but I flagged both workflows, and it works correctly in production now! Thanks!