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
Filipe ResendeFilipe Resende 

Check business days

Hi

I'm doing a task of scalation to send emails every 24hrs, but emails can not be sent on weekends and holidays, knowing that the holidays vary from city to city. How can I make the Developer for the emails are sent only on working days?
Prateek Singh SengarPrateek Singh Sengar
Hi Fillipe,
Do you have a custom object where you have stored the holiday information for each city? if so that you can use this information to control the emails. I would recommend using a batch class to query this information and trigger the emails as it will provide more flexibility in terms of processing the holiday information and controlling the email alerts.
Filipe ResendeFilipe Resende
In the case as I should only do with national holidays?