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
bikla78bikla78 

After Insert Outbound Email- exe on Schedule

I have an after insert trigger on my event object the sends an outbound email to the event.whoid.email.  How can I run apex trigger 2 days before event date and once again a day before the event date? The purpose is to remind the contact associated with the event that the meeting will be happening..kinda like an outlook reminder

 

 

The name of thetigger is ConsultantNotification

Always ThinkinAlways Thinkin
Since Apex Triggers don't have any time-based functionality yet, you have to use a time-based workflow to accomplish this. Create a time-based workflow on your Event that updates a field two days before the event date. Create an after update trigger on Events that watches for that field update and sends the email.