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!

  • No, it won't send recursive emails. – Tushar Sharma Jun 18 '18 at 13:11
  • it works through configuration itself, check my answer – Santanu Boral Jun 18 '18 at 13:37
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.

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.