Skip to main content
We want to setup some time dependant workflows to send out some emails. At some point a sales person may want to stop those emails going out - so we have a checkbox that they can tick and the rule notices and removes all the pending actions.

 

However if they now want to restart those emails, then when they uncheck the box the rule then re-adds ALL the emails again. So if one of them way 60 days before X and another 40 days before X and we are in fact now 30 days away - then both the 60 and 40 ones get re-sent, even though they are in the past.

 

Is there a way to prevent actions that would be in the past from getting created (e.g. APEX trigger?) - I really don't want to have to make one workflow rule per email with single time based one in each.

 

[Also posted at http://salesforce.stackexchange.com/questions/49731/prevent-time-dependant-workflow-actions-that-would-be-in-the-past but not sure which is the best place yet!]
9 answers
  1. Sep 18, 2014, 1:50 AM
    You may need to use a different date field in the time-based action. I'm assuming it's currently running from the trigger date. Try something that will be more dynamic, like if that box is unchecked, timestamp a new date/time field and run the rule from there.
0/9000