From Renato Oliveira: New Business Hours Actions
Renato has built a package that exposes the main Business Hours functions that are normally only available to Apex developers:
Here are the actions:
- BusinessHoursAddAction (businessHoursId, startDate, intervalMilliseconds)
Adds an interval of time from a start Datetime traversing business hours only. Returns the result Datetime in the local time zone. - BusinessHoursAddGmtAction (businessHoursId, startDate, intervalMilliseconds)
Adds an interval of milliseconds from a start Datetime traversing business hours only. Returns the result Datetime in GMT. - BusinessHoursDiffAction (businessHoursId, startDate, endDate)
Returns the difference in milliseconds between a start and end Datetime based on a specific set of business hours. - BusinessHoursIsWithinAction (businessHoursId, targetDate)
Returns true if the specified target date occurs within business hours. Holidays are included in the calculation. - BusinessHoursNextStartDateAction (businessHoursId, targetDate)
Starting from the specified target date, returns the next date when business hours are open. If the specified target date falls within business hours, this target date is returned.
Install
V1.0.0 10/23/22 Production Sandbox – First release
Old Versions