You need to sign in to do that
Don't have an account?
LorrMc
How do I send email when date is reached with a trigger?
Hi,
I am new to tirggers so I hope you can help, I need to send multiple email alerts based on a date field.
The emails should send at 60,50,40,30 and 10 days before the Registration renewal date field.
I can not use a workflow or process builder as the records will not be edited and the date may not be populated when the record is created.
I would be grateful if you could please advise as I am tottaly lost.
I hope this makes sense and Thank you in advance.
Lorr
I am new to tirggers so I hope you can help, I need to send multiple email alerts based on a date field.
The emails should send at 60,50,40,30 and 10 days before the Registration renewal date field.
I can not use a workflow or process builder as the records will not be edited and the date may not be populated when the record is created.
I would be grateful if you could please advise as I am tottaly lost.
I hope this makes sense and Thank you in advance.
Lorr
Hi Lorr,
The best solution in this scenario would be to create a Apex batch class which can be scheduled to run on a daily basis.
In the batch class, you can write a logic to check if today's date is 60,50,40,30 or 10 days days prior to the Renewal date and send an email accordingly.
Let me know if you need any further clarification.
Thank you for the response, how do I create a batch class?
Sorry this really is new to me.
Lorr