- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2014 10:18 AM
Can someone explain how I can set-up approval reminders to automatically be sent out daily? I am mostly interested in reminders for requests in the Service Catalog, but if it cannot be scoped to that, then any approval reminders will do? I can't believe this isn't an OOB scheduled job in ServiceNow...
Thank you,
Shane
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2014 09:08 PM
Hi Shane,
Since you have written the email notification in the sysapproval table, better you query sysapproval itself in the scheduled job. Please check the code below given by Bhavesh, its checking if the approval is for catalog request and whether the request is still in requested state. Please make sure you change the event name in the below code to the one you already have, it will look like this:-
var gr = new GlideRecord('sysapproval_approver');
gr.addQuery('state', 'requested');
gr.addQuery('sysapproval.sys_class_name','sc_request');
gr.query();
while (gr.next()) {
gs.eventQueue("catalog_task_approval_reminder",gr, gs.getUserID(), gs.userName());
}
In the email notification,for Who will receive, make Users/Groups in fields as 'Approver', it should work fine. Also make sure that you check the 'Send to event creator', its just for testing you can deactivate later.
Thanks & Regards,
Hari
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-24-2014 02:18 AM
Hi Shane,
I have implemented this solution for more details Please see solution.
How to create a reminder notifications for pending request to be approved?