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
Building RadarBuilding Radar 

Trigger email on future date

Hi everyone,

I am new to APEX programming so this will probably be an absolute rookey question:

How do I trigger a certain email or email alert on a date/time field I create on contacts? So what I want to do is to send an email to a contact one minute before a manually given date/time on the contact's page in my salesforce.

Thanks for the help! 

Naveen Nelavelli 9Naveen Nelavelli 9
Hi  ,
you dont  need apex for this functionality.Using time trigger workflow rules you can achieve this.
Building RadarBuilding Radar
Hi Naveen,
I am not sure how that is supposed to work either since you're again working with workflow rules. Moreover, it says that "Time triggers can’t reference the following: DATE or DATETIME fields containing automatically derived functions, such as TODAY or NOW." 
I would be most grateful if you could help me find a way to implement what I am looking for.
Many thanks
Naveen Nelavelli 9Naveen Nelavelli 9
Hi ,Firing time trigger based formula field doesnt make sense as formula field is dynamic.Create a date field and populate it from trigger or workflow rule.Now create tim trigger based in your date field.
Points to consider
1.If record satisfies work flow criteria and  whenever value of your date field is updated time trigger action will get Rescheduled based on new value(if action is in queue ).
2.if record not satisfying condintion after your updating date filed ,time trigger action will be removed from queue(setup-->monitor-->time based workflow) you can check your scheduled actions.