You need to sign in to do that
Don't have an account?

How to perform time dependent workflow actions using apex trigger
Hi team,
I have workflow rule which sends email notification once the criteria is met and sends another notification 30days after the rule trigger date.
I am replacing the entire workflow rule using apex trigger. How do I send email notification 30days after the initial rule trigger date?
I have workflow rule which sends email notification once the criteria is met and sends another notification 30days after the rule trigger date.
I am replacing the entire workflow rule using apex trigger. How do I send email notification 30days after the initial rule trigger date?
You should Messaging.SingleEmailMessage to send a custom notification in your trigger. Below is a sample code
If you want to Generate critical date reminders to remind Opportunity owners for example when a large Opportunity (amount greater than $1M USD) is 14 days away from the intended Close Date, you should perform a query on opportunity instead with the filters that would match your rule
Let me know if this helps
Anudeep
This code just sends the email notification which I have already implemented. My requirement is once the email is sent, I need to resend the email after 30days (certain number of days).
I want to replicate the functionality available in workflow time trigger actions.