how can i trigger a notification when the due date is breached and date changes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-07-2020 01:50 AM
Hi All,
Can u please help me " when the due date is completed after that the email should be send as notification by using date" .
- Labels:
-
Notifications

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-07-2020 01:55 AM
Hi,
use the solution provided here, it should work fine:
If I have answered your question, please mark my response as correct and/or helpful.
Thank you very much
Cheers
Alberto

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-07-2020 02:03 AM
Hi Naveen,
You need to create:
1.Event
2. Notification
3.Schedule Job
Trigger notification through the event.
Add the below script in your Scheduled Job.
var table=new GlideRecord('table')//Add your table name.
table.query();
while(table.next())
{
var currentDate=new GlideDateTime();
var dueDate=new GlideDateTime(current.duedate);//check your variable name(due date)
var diff=gs.dateDiff(currentDate,dueDate);
if(diff==1)//if difference of current date and due date is 1 then
{
gs.eventQueue('Event name',table);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-07-2020 02:10 AM
Do below Steps:
1.Create an event in Event Registry. let’s say Event Name is “u_off_hold_date.reminder" on incident table.
2.Create a business rule with Run conditions. Let say Due date CHANGES AND add following code:
var dueDate = current.due_date ; // replace due_date with your field name
gs.eventQueueScheduled ("u_off_hold_date.reminder" , current , gs.getUserID(), gs.getUserName(), dueDate);
3. Create/ Modify your notification as below to send this mail on date:
In the Event name , select a event name that you have created.
Read this more details,
eventQueueScheduled(String name, Object instance, String parm1, String parm2, Object expiration)
Please mark as Correct Answer and Helpful, if applicable.
Thank You!
Abhishek Gardade
Abhishek Gardade