[SalesForce] Email 45 days before contract End Date when End Date can keep changing

How can I do this? I have a field which contains a person's contract end date.

I can't use Evaluate This Rule When the Record is "created" – because it will never run again, after the record is first created. i.e. if the person's contract is extended.

I can't use "created, and every time it’s edited" because then I can't use time-dependent workflow actions i.e. my reminder email 45 days before end date.

And I can't do "created, and every time it’s edited" because it will only trigger the first time the criteria is met never again (if my criteria is "EndDate__c >= TODAY + 45").

Any ideas?

Best Answer

This is standard functionality. If the date used to calculate a time based workflow changes, the schedule time for the action will change accordingly.

From the knowledge article:

https://help.salesforce.com/HTViewSolution?id=000005245&language=en_US

and the key text:

What happens if I update the value of a date field used in a time trigger?

If you update the date field used in a time trigger, Salesforce recalculates the time trigger as long as the time trigger has not yet fired and the recalculation does not reschedule the time trigger to a date in the past.

For example, if a workflow rule alerts the opportunity owner seven days before the opportunity close date and the close date is set to 2/20/2008, Salesforce sends the alert on 2/13/2008. If you update the close date to 2/10/2008 and the current date is 2/2/2008 or before, Salesforce reschedules the alert for 2/3/2008. The evaluation date of pending actions is ALWAYS reevaluated and updated if necessary irrespective of the rule criteria. Of course, if the rule is evaluated to false, it does not matter as the actions are removed from the queue.