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
Jacob W LandisJacob W Landis 

how to add custom email alert to time dependent workflow?

So we like to have a time dependent email alert, for example 2 weeks before close date. The email need to send to the children records email fields, also different children would see their own data which has a link. I don't think the email template can do it. I need to have a custom apex code, but I don't know how time dependent workflow can call my apex code.
Best Answer chosen by Jacob W Landis
anto nirmalanto nirmal
Hi Jingli,

If you need to go ahead with apex, You can have an apex scheduler that runs daily and fetches all the records that is tweeks before close date and send an email to those relevant contacts.

Please let me know if that helps.

As a common practice, if your question is answered, please choose 1 best answer.
Additionally you can give every answer a like if that answer is helpful to you.

Regards,
Anto Nirmal
 

All Answers

anto nirmalanto nirmal
Hi Jingli,

If you need to go ahead with apex, You can have an apex scheduler that runs daily and fetches all the records that is tweeks before close date and send an email to those relevant contacts.

Please let me know if that helps.

As a common practice, if your question is answered, please choose 1 best answer.
Additionally you can give every answer a like if that answer is helpful to you.

Regards,
Anto Nirmal
 
This was selected as the best answer
MaKSinghMaKSingh
Hi Jingli,
i think that you should use Process Builder for  calling apex instead of using workflow for time dependent actions.