Skip to main content
1 of 4
sfelf
  • 1.2k
  • 3
  • 14
  • 27

Work Around: if action is a field update

As Matt mentioned in his answer Time-Dependent workflows only check to see if the criteria is still true if the record that is queued is updated. They do not check to see if the criteria is still true before kicking off the action. However if your action is a field update you could place your criteria in the formula for the field update. This effectively verifies the criteria is still true before performing the field update.

Using the example from the question and assuming the field update action was setting ObjA__c.updateIntValue__c = 1 the formula value below would not perform the field update if ObjB__c.intVal__c was changed between the time the workflow rule was queue and when it was executed.

IF( ObjA__c.intVal__c = 5 && ObjB__c.intVal__c = 3, 1, ObjA__c.updateIntValue__c )

By rechecking the workflow criteria in the field update you are effectively causing the workflow rule to check if it's criteria is still true before performing the action. Note if the criteria is false you want to set the field value back to its current value.


Edit:

Note that in the actual formula value the "ObjA__c." would not appear before the field names. I have included them there only to clarify which object/field is being referenced.

sfelf
  • 1.2k
  • 3
  • 14
  • 27