function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SalesforceCrm AccountCRMSalesforceCrm AccountCRM 

Email Notification from contract end date

Hi ,
I had a requirement where i need to send an notification email before the 90 days from the contract end day.So we have created a batch class and it worked fine .But now their is a change in the requirement.So how can i achieve this with the combination of workflow ,trigger or batch classes.Any Suggestion very much appreciated.
1)When Contract End Date is exactly 4months days from now, send email notification to Sales Representative giving  a condition .
2)When Contract End Date is exactly 3months days from now, send email notification to Sales Representative  + Supervisior giving a condition .
a)When Customer says Yes ,then an email notification to be sent before the contract days prior to 3mnths/2mnths /1mnth.
b)when customer say no ,then stop sending an email notification.
This all should be sent when a contract role =SA/EB/TA etc.
Ravi Dutt SharmaRavi Dutt Sharma
Requirement 1) Create a batch class which will check the Contract end date for 4 months. This class will fetch those only those records whose Contract End Date is exactly 4months from now. Have a checkbox called "Is Contract End Date 4 month mail sent" - default value false. Update the checkbox to true in your batch class. Create a workflow whose entry criteria is the checkbox and send mail through the workflow.
Requirement 2) Same as point 1.
Requirement 3) Additional check in workflow entry criteria that will check whether the customer has said yes.
Requirement 4) Would be covered in point 3.
SalesforceCrm AccountCRMSalesforceCrm AccountCRM
@Ravi Dutt Sharma :Thanks for your response.
For Example :I have a account ,opportunity , contratc and contact with name xyz,adc,def,ghi and Owner name as 'Sales Rep'.Now how could i send an email to the Owner of the records 4months before the contract end date.
How do i loop the salesrep and the manager to send an email
Any example very much appreciated .