2

I have a custom field on a standard object called Due_Date__c. When the record has an overdue date, the owner of the record should receive a reminder email.

So I have set a workflow rule with a time dependent action. The criteria is the following: TODAY() >= Due_Date__c It is evaluated 'when a record is created, and any time it’s edited to subsequently meet criteria'.

I have added a time-dependent action 0 Hours After Rule Trigger Date with an Email alert. The email is sent if I create a Case with a Due Date equal to Today, but how can I know for sure that, if I set the Due Date to tomorrow, tomorrow the email alert will be sent? Without waiting until tomorrow, how can I test it?

I'm not quite sure about the meaning of 'any time it’s edited to subsequently meet criteria' - do I need to edit the object to make the workflow start or is it evaluated automatically?

Thanks

  • just checking if your solution worked ? – apn Dec 13 '18 at 22:59
3

The way you need to approach this is make it so that the workflow always fires, but if the Case is not overdue at the time the Time-Dependent action takes place, the email won't go out. In a deadline scenario, there are usually two factors - the deadline, and some indication of whether the task has been completed. With a Case, this is likely whether or not the Case has been Closed. So your WFR criteria could be:

NOT(ISBLANK(Due_Date__c)) && NOT(IsClosed)

Then your time dependent action would be 0 hours after Due_Date_c. If the Case is closed between the time the workflow initially fires and the Due Date, then the email won't go out. If the case is still open, then the queued email will be sent. If the Due Date is changed, then the workflow re-fires and the old email is removed from the queue and a new one based on the new date is queued up.

  • but there is something I don't get: when will this be evaluated? Alway or only when I edit the case? – tony danza May 14 '14 at 14:43
  • The workflow criteria are only evaluated when you save the case. If the criteria are true, then the time-based workflow action is queued. If the Case is edited before the action is scheduled to take place such that the workflow criteria are no longer true, then the action is removed from the queue. – Thomas Taylor May 14 '14 at 14:46
  • The wf should still be evaluated 'when a record is created, and any time it’s edited to subsequently meet criteria', right? – tony danza May 14 '14 at 15:10
  • Yes. There are scenarios where "When record is created" applies to time-based workflow, but this doesn't seem to be one. – Thomas Taylor May 14 '14 at 15:12
  • @ThomasTaylor Is the formula you wrote suppose to be used with the Criteria "Formula evaluates to true." – Skobiwankanobi Dec 5 '16 at 22:52
1

Your workflow will not work. The workflow rules are only evaluated when the record is edited. For the way your workflow to work as you've written it, you would need to edit every record every day.

You want your workflow rule criteria to be NOT(ISBLANK(Due_Date__c)). This will cause the workflow to fire when there is a due date. Then on your actions, you'll have your time dependent action as you've written it.

To see emails pending, go to Setup>Monitor>Time-based Workflow and click search. You should see all pending emails.

If your due date changes, then so will the pending emails.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.