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
Ugochukwu Nwuwa 7Ugochukwu Nwuwa 7 

How to build a Time trigger to fire off email alert based on the custom field expiration date and also update the record based on the number months listed on the renewal term field

Hi All, 

Please I am trying to build a time trigger and workflow to fire an email allert based on a custom field expiration date and renew the record as well. I have an Auto-Renew checkbox which users will check when they create an agreement, if that agreement will be auto-renewed at the end of the date on the END DATE field, using the term number on the agreement term field. I know this is complicated I will be more than happy to provide more clarifacation. Thanks in advance
Waqar Hussain SFWaqar Hussain SF
Hi,
You can define time dependent workflow rule to send email after speicfic time of expiration date field. On the same rule you can do a field update as well to renew the record.

You can set workflow rule to renew the agreement after one hour of expiration date and update the end date field. 

See how to setup time dependent workflow rules
https://help.salesforce.com/articleView?id=000005245&type=1

Regards,
Waqar
NagendraNagendra (Salesforce Developers) 
Hi Nwuwa,

Please see the below and tweak it as per your requirement.

Yes, you can configure a time base workflow and send a time-based email. 
Goto Setup | Create | Workflow and Approvals | Workflow processes
User-added image
Check this help documentation as well  I found a good example of time trigger emails... check this out. you can build something in same lines for your requirement. Let me know if you need help in configuring a time-based workflow. 

Contact Birthday Reminder:

This example assumes there is a Next Birthday custom formula field that uses the following formula to calculate the date of the contact's next birthday on contact records:
IF(MONTH(Birthdate)>MONTH(TODAY()),DATE(YEAR(TODAY()),MONTH(Birthdate),DAY(Birthdate)),
IF(MONTH(Birthdate)<MONTH(TODAY()),DATE(YEAR(TODAY())+1,MONTH(Birthdate),DAY(Birthdate)),
IF(DAY(Birthdate) >= (DAY(TODAY())),DATE(YEAR(TODAY()),MONTH(Birthdate),DAY(Birthdate)),
DATE(YEAR(TODAY())+1,MONTH(Birthdate),DAY(Birthdate)))))
Object
Contact

Description
Send an email to the contact two days before the contact's birthday.

Evaluation Criteria
Only when a record is created.

Rule Criteria (Filter)
Run this rule if the following formula evaluates to true:
(Contact: Birthdate not equal to null) and 
(Contact: Email not equal to null)
Immediate Actions
None.

Time-Dependent Actions
2 Days Before Contact: Next Birthday
Email Alert: Send a birthday greeting to the contact's email address.

Hope this helps.

Kindly mark this as solved if my reply was helpful so that it gets removed from the unanswered queue which results in helping others who are encountering a similar issue.

Thanks,
Nagendra