- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2018 02:11 PM
Hi,
here i have one typical task that is send notification when Due date and time reached
Ex: in incident table i have 5 incidents
first ---> due date 26-04-2018 16:00:00 send notification exact at 26-04-2018 16:00:00
second--->due date 26-04-2018 13:20:00 send notification exact at 26-04-2018 13:20:00
third--->due date 26-04-2018 18:00:00
fourth--->due date 26-04-2018 17:40:00
fifth--->due date 26-04-2018 16:10:00 all incidents are 26-04-2018 but time is different so is it possible to send notification based on Date & time when it match with current Date & Time......
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2018 11:03 PM
Hi,
Try creating an insert/update Business Rule as below.
gs.eventQueueScheduled('event.name',current,gs.getUserID(),gs.getUserName(),current.u_due_field_name);
Before this, create an event with name as event.name and create a notification to be sent when this event fires.
In the notification, check Event parm 1 contains recipient and Event parm 2 contains recipient.
Hope this solves your issue.
Thanks,
Archana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2018 08:26 AM
Thanks Archana!!!
Thanks for your reply
as well as we should create Business Rule on sysevent table to delete previous events in Queue...
Ans: Create Business Rule, create an event, create notification, create BR on event table
BR Script:
Table: u_hr_form, when to run: insert(only) , before
Script: gs.eventQueueScheduled('alert_due',current,current.u_approver,'',current.u_alert_due);
BR: Delete duplicate events trigger cookies
Table: u_hr_form , when to run: update(only) , before condition: AlertDue changes
Script:
var gr = new GlideRecord('sysevent');
gr.addQuery('state', 'ready'); // We only want the event in the ready state
gr.addQuery('name', 'alert_due'); // Change the event name to the event name you are using
gr.addQuery('table', 'u_hr_form');
gr.addQuery('instance', current.sys_id); // Get the event that has been created for this record
gr.query();
while(gr.next()){
gr.deleteRecord();
}
gs.eventQueueScheduled('alert_due',current,current.u_approver,'',current.u_alert_due);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2018 08:33 AM
This worked. Right?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2018 12:44 AM
yes...it is working..!!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2018 09:49 PM
Awesome, pick someone's response to mark this as answered.