[SalesForce] time dependent workflow-action execution order

Does someone know something about the action execution order please?

I have defined a workflow named Update Access Granted.

And I can see some scheduled actions from Set up -> Monitor -> Time-Based workflow as below.

enter image description here

I just wonder there are two actions which will execute at the same time 16/07/2015.

Will the two actions execute according to the order as the shown on the monitor?

Actually, my two actions will update the same field with different values.

So the execution order is very important to me.

Does anyone has ideas about this?

Thanks in advance.

Best Answer

Time-dependent actions aren't executed independently. They're grouped into a single batch that starts executing within one hour after the first action enters the batch. So the sequence for the screenshot you posted is not gauranteed (atleast as per documentation)

Salesforce doesn't necessarily execute time triggers in the order they appear on the workflow rule detail page. Workflow rules list time triggers that use the Before field first, followed by time triggers that use the After field. again sequence is not gauranteed.

You will have to seperate the field updates to fire on two different time triggers. like 0 hours before a certain date and 1 hours after a certain date.This will guarantee a full-proof solution. Now, you can also try 0 hour before and 0 hour after and run few tests but its not documented that this guarantees the sequence.

Also you might want to look into this post which has a good approach to seperate the time triggers in minutes. http://sftipshack.wordpress.com/2013/10/21/the-5-minute-time-based-workflow-or-15-minute-or-30-minute/

Related Topic