How to send a reminder prior one hour of the start date and time.

Prithvi Ramesh1
Mega Sage

How to send a reminder prior one hour of the start date and time?

5 REPLIES 5

Hello @Prithvi Ramesh1, you can loop thru RITM records and then look up related approval records along with get Catalog variable (start_date in your case). I have created a dummy FD, please try out the similar approach:

 

Nishant8_1-1752243225195.pngNishant8_2-1752243302475.png

 

Here is modified script. please note that I haven't modified the logic, only including a check to ensure start_Date isn't null

var startDT = fd_data._4__get_catalog_variables.start_date;
if ( startDT ) {
var startDateTime = new GlideDateTime(startDT);
var nowDateTime = new GlideDateTime();
var diffMillis = startDateTime.getNumericValue() - nowDateTime.getNumericValue();

// Check if current time is within one hour before start time
if (diffMillis > 0 && diffMillis <= 3600000) {
    return true;
}
}

 

Hope this will help you.

 

Regards,

Nishant