2

I want implement Time-Dependent WF Action for 15 days before the due date. Will it send email-alter to every day before the due date(I mean all 15 days)?

Thanks in advance!

2
  • No, it won't send recursive emails. Jun 18, 2018 at 13:11
  • it works through configuration itself, check my answer Jun 18, 2018 at 13:37

2 Answers 2

1

This is not possible using simple Workflow. You can vote this idea.

Recurring Time-Based Workflow Actions/Email Alerts

This types of requirement can be easily handled by Batch apex. Just schedule a batch daily who will pick all the matching records and will send email on them.

Trailhead module for you. Use Batch Apex

1

To create a recursive action you need to do some trick.

Create a datetime (lets say schedule_datetime__c field) field based on which you want to perform time based action to send an email.

Define workflow flow rule based on which it will satisfy the criteria like schedule_datetime__c < Due_Date__c

In the time based workflow, perform 2 action.

  1. Send a email 1 hour before schedule_datetime__c.
  2. Create a field update which will update schedule_datetime__c + 1 day. In the field update configuration, be sure to select Re-evaluate Workflow Rules after Field Change which will help to fire workflow again.

This way, everytime after firing the action, schedule_datetime__c will be updated to next day and workflow will pull the action.

This solution also works for a scenario like if you want to send birthday wish every year to your customer.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .