How to set Email Reminder for Approvers 3/7/14 days past the request was raised for Policy Exception
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2024 11:46 PM
ServiceNow Automatic Email Reminder for Approvers on Policy Exception form of GRC module
- 3 days past the request was raised
- 7 days past the request was raised
- 14 days past the request was raised
Could you please provide steps by step to setup these reminders for approvers on Policy Exception form.
I read about creating approval rule but that's not working, maybe I am missing something.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2024 12:05 AM
Hi @Priya Singh 2 2 ,
You can achieve it by using ScheduleOnce()
The steps would be :
1) Calling a script inlcude when form submits(Use BR / onSubmit CS)
2) Refer below script for script include. Modify it according to your use
3) Add more functions like notifyUserAfterThirdDay for 7 and 10 days approval
4) So all the notiifcations will be scheduled and when they will run , if the record is approved abort sending notification(as mentioned in below script)
5) You can find scheduled notification here - sys_trigger table
**********************************************************
scheduleNotifications: function(record) {
//Setting up future date to send notification after 3 days from submission of form
var firstNotificationDate = new GlideDateTime();
firstNotificationDate.addDaysUTC(3);
//scheduling first notification after 3 days from submission of form
var scheduledExecution = new ScheduleOnce();
scheduledExecution.script = 'new testScriptInclude().notifyUserAfterThirdDay("' + record.getUniqueValue() + '","' + record.requestedFor + '")';
scheduledExecution.setTime(firstNotificationDate);
scheduledExecution.setLabel(’ThirdDayNotification’);
scheduledExecution.setDocument(record);
scheduledExecution.schedule()
}
},
notifyUserAfterThirdDay: function(record,userSysId ) {
Use glide record on approval table, if
if (it is not approved for the current record) {
//notify user
gs.eventQueue(‘event name’, record, userSysId);
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2024 10:33 AM
@Addy22 thank you for the response.
I have been asked to fulfill this requirement by using flow designer, could you please advise how I can achieve it with the help of flow designer ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2024 11:01 AM - edited 08-04-2024 11:04 AM
@Priya Singh 2 2 Sure you can achieve it through flow designer too.
1) Just you need to create a new flow action which will have script and you can call the above script include form there.
2) Call this action from your flow.