- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2025 03:58 AM
How can we generate a notification for the manager of the 'Requested For' user when a Requested Item (RITM) for a specific catalog item has a start date between 5 to 6 days ago?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2025 04:05 AM
Hello @itsangeleye
Please find below code and let me know if that works for you
Schedule job:
var gr = new GlideRecord('sc_req_item');
gr.addQuery('cat_item', '620c2fb4c39b5a1004c43132b40131d1'); // replace your catalog item sys_id
gr.addQuery("variables.effe2774c35f5a1004c43132b4013141", "<=", gs.daysAgo(5)); //replace your start date variable sys_id
gr.query();
gs.info(gr.getRowCount());
while (gr.next()) {
gs.eventQueue('send.notification.demo', gr, gr.variables.manager, ''); // Event should be created
}
Thank you!
Thank You!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2025 04:11 AM
@itsangeleye
You can create a flow and set it accordingly.
Or a workflow, depending what is in use for your instance
Let me know how you progress and if you need to consult some steps
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */