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!
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.Sign up to join this community
This is not possible using simple Workflow. You can vote this idea.
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
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.
schedule_datetime__c + 1 day. In the field update configuration, be sure to select
Re-evaluate Workflow Rules after Field Changewhich 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.