Notification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2024 11:23 AM - edited ‎03-29-2024 11:26 AM
Hello Experts,
I am attempting to meet a requirement where I need to send a notification 7 days before the end of the month, excluding weekends.To achieve this, I'm using the Flow Designer's "wait for the duration of time" action. I've set a flow variable value as 'gdt' using the following inline script:
var gdt = new GlideDateTime('2024-03-31 08:00:00');//pass this value for testing
gdt.addDaysLocalTime(-7);
return gdt;
My expectation is that when the "wait for duration" action progresses after the flow variable date, I'll send the notification. However, it seems that business holidays are not being excluded. What mistakes might I be making here? Please guide me.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2024 07:45 PM
Hey Mark-
Seems like a good use case for schedules and the GlideSchedule API. Specifically, look at the isInSchedule() function. The pic below is of one of the OOB schedules from the cmn_schedule table. This should do what you need.
HTH
-Roger