Skip to main content
added 32 characters in body
Source Link
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 as well as in the rule criteria. 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.


2nd Edit:

Work Around: if action is not a field update

Thinking about this solution more it could be combined with another workflow rule if the desired end action was something other then field update.

To do this start by setting up your time-dependent workflow with a field update which updates a field such as wf_trigger__c with a specified value. Then have a second workflow rule that monitors the wf_trigger__c for the specified value with an immediate action that kicks off the desired end action and a field update that removes the specified value from the wf_trigger__c field.

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.


2nd Edit:

Work Around: if action is not a field update

Thinking about this solution more it could be combined with another workflow rule if the desired end action was something other then field update.

To do this start by setting up your time-dependent workflow with a field update which updates a field such as wf_trigger__c with a specified value. Then have a second workflow rule that monitors the wf_trigger__c for the specified value with an immediate action that kicks off the desired end action and a field update that removes the specified value from the wf_trigger__c field.

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 as well as in the rule criteria. 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.


2nd Edit:

Work Around: if action is not a field update

Thinking about this solution more it could be combined with another workflow rule if the desired end action was something other then field update.

To do this start by setting up your time-dependent workflow with a field update which updates a field such as wf_trigger__c with a specified value. Then have a second workflow rule that monitors the wf_trigger__c for the specified value with an immediate action that kicks off the desired end action and a field update that removes the specified value from the wf_trigger__c field.

added 52 characters in body
Source Link
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.


2nd Edit:

Work Around: if action is not a field update

Thinking about this solution more it could be combined with another workflow rule if the desired end action was something other then field update.

To do this start by setting up your time-dependent workflow with a field update which updates a field such as wf_trigger__c with a specified value. Then have a second workflow rule that monitors the wf_trigger__c for the specified value with an immediate action that kicks off the desired end action and a field update that removes the specified value from the wf_trigger__c field.

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.


2nd Edit:

Thinking about this solution more it could be combined with another workflow rule if the desired end action was something other then field update.

To do this start by setting up your time-dependent workflow with a field update which updates a field such as wf_trigger__c with a specified value. Then have a second workflow rule that monitors the wf_trigger__c for the specified value with an immediate action that kicks off the desired end action and a field update that removes the specified value from the wf_trigger__c field.

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.


2nd Edit:

Work Around: if action is not a field update

Thinking about this solution more it could be combined with another workflow rule if the desired end action was something other then field update.

To do this start by setting up your time-dependent workflow with a field update which updates a field such as wf_trigger__c with a specified value. Then have a second workflow rule that monitors the wf_trigger__c for the specified value with an immediate action that kicks off the desired end action and a field update that removes the specified value from the wf_trigger__c field.

added 571 characters in body
Source Link
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.


2nd Edit:

Thinking about this solution more it could be combined with another workflow rule if the desired end action was something other then field update.

To do this start by setting up your time-dependent workflow with a field update which updates a field such as wf_trigger__c with a specified value. Then have a second workflow rule that monitors the wf_trigger__c for the specified value with an immediate action that kicks off the desired end action and a field update that removes the specified value from the wf_trigger__c field.

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.

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.


2nd Edit:

Thinking about this solution more it could be combined with another workflow rule if the desired end action was something other then field update.

To do this start by setting up your time-dependent workflow with a field update which updates a field such as wf_trigger__c with a specified value. Then have a second workflow rule that monitors the wf_trigger__c for the specified value with an immediate action that kicks off the desired end action and a field update that removes the specified value from the wf_trigger__c field.

Source Link
sfelf
  • 1.2k
  • 3
  • 14
  • 27
Loading