- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2023 11:23 PM
Hi team,
How to send the notification when ritm approval is approved state and type is draft stage then send the notification for every week?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2023 11:37 PM
Hi @Alex78 ,
You can create schedule job that will run on weekly and add below script and create one event and call that event notification and schedule job.
var ritmGr = new GlideRecord('sc_req_item');
ritmGr.addQuery('approval', 'approved');
//you can addQuery for specific item to trigger notification
ritmGr.addQuery('stage', 'draft');
ritmGr.query();
while (ritmGr.next()) {
gs.eventQueue('eventname',gr,param1,param2);
}
Check below link how to create schedule job notification and event
https://www.servicenow.com/community/developer-forum/creating-schedule-job-to-send-notification/m-p/...
Please mark it as helpful and solution proposed if it serves your purpose.
Thanks,
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2023 11:37 PM
Hi @Alex78 ,
You can create schedule job that will run on weekly and add below script and create one event and call that event notification and schedule job.
var ritmGr = new GlideRecord('sc_req_item');
ritmGr.addQuery('approval', 'approved');
//you can addQuery for specific item to trigger notification
ritmGr.addQuery('stage', 'draft');
ritmGr.query();
while (ritmGr.next()) {
gs.eventQueue('eventname',gr,param1,param2);
}
Check below link how to create schedule job notification and event
https://www.servicenow.com/community/developer-forum/creating-schedule-job-to-send-notification/m-p/...
Please mark it as helpful and solution proposed if it serves your purpose.
Thanks,
Anand