Notification

Mark Wood
Tera Contributor

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.

1 REPLY 1

Roger Poore
Tera Guru

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

 

RogerPoore_0-1711766279694.png