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
Nicole SackinNicole Sackin 

trigger email alerts from developer query

Hello
I am trying to send an email to all the Owners of Opportunities when those Opportunities are 90 days from closing.
I have a custom field called "Days til Close" and I have an email template and a email alert setup.

I need to know how to
1) schedule query that looks up all the Opportunities that have 90 in the "days to close" field
2) run a flow or trigger an email alert to fire.

Does anyone know how to do this?  

Thank you,
Nicole
Uttpal_ChandraUttpal_Chandra
Hi Nicole ,

You can use batch class with schedule class to run and check your criteria everyday and sending email.