- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2023 11:34 PM
i created a record today now after the 4 days i have to send notification how i can do this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2023 03:04 AM
Sorry for the confusion, please check this script:
I assume Schedule job will execute once a day and it will check all the records of a table
var days = 4;
var date = new GlideDateTime();
date.addDaysUTC(-days);
gs.info(date); // this will give 23/11/2023
var gr = new GlideRecord("incident");
gr.addQuery("sys_created_on" ,"<", date);
gr.query();
while(gr.next()){
gs.eventQUeue("TestEvent",gr);
}
If my answer solved your issue, please mark my answer as ✅ Correct & 👍Helpful based on the Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2023 03:04 AM
Sorry for the confusion, please check this script:
I assume Schedule job will execute once a day and it will check all the records of a table
var days = 4;
var date = new GlideDateTime();
date.addDaysUTC(-days);
gs.info(date); // this will give 23/11/2023
var gr = new GlideRecord("incident");
gr.addQuery("sys_created_on" ,"<", date);
gr.query();
while(gr.next()){
gs.eventQUeue("TestEvent",gr);
}
If my answer solved your issue, please mark my answer as ✅ Correct & 👍Helpful based on the Impact.