- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2014 07:24 AM
I am trying to set up an email notification ONLY IF a change task is 7 days past due date! The email should only be sent to the person who has been assigned the change task.
Please help!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2014 08:50 AM
I don't think you're actually looping through the records you found in your example, so gr is referencing a set of records. Try this:
var gr = new GlideRecord('change_task');
gr.addQuery('due_date', '<=', gs.nowDateTime());
gr.addQuery('active', true); //you probably want to add this so you only send reminders on open tasks
gr.query();
while (gr.next()) {
gs.eventQueue("change_task.duedate_reminder", gr, gs.getUserID(), gs.userName());
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2015 11:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2015 09:59 AM
I'm running this same script against the change request and using the end_date. My event seems to fire per the log, but the notitfication sent to use that event doesn't send.
- var gr = new GlideRecord('change_request');
- gr.addQuery('end_date', '<=', gs.nowDateTime());
- gr.addQuery('active', true); //you probably want to add this so you only send reminders on open tasks
- gr.query();
- while (gr.next()) {
- gs.eventQueue("change.late.closure.enddate", gr, gs.getUserID(), gs.userName());
- }
Any ideas?