need to change incident automatically when offhold date completed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2023 07:34 PM - edited 08-04-2023 07:35 PM
We have created an offhold date for on hold reasons; whenever the offhold date is reached, the incident state should be changed to inprogress automatically.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2023 03:39 AM
I think this won't work. There is no field change, so the flow will probably not pick this up.
I would suggest to create a scheduled event, which triggers a script action once the schedule has been reached.
See for your reference:
Script actions (servicenow.com)
GlideSystem | ServiceNow Developers
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2023 12:58 PM
You can also try, wait for duration action, 1 second after your field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2023 08:49 PM
heres a screenshot:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2023 06:06 AM
I created a scheduling job, and it works as planned, but anytime worknotes updates, it displays my name, whereas it should appear as system. How can we achieve this?
Run: Periodically
var gr = new GlideRecord("incident");
gr.addQuery('state', 3); // state is onhold
gr.query();
while(gr.next())
{
var diff = gs.dateDiff(gs.nowDateTime(), gr.u_off_hold_date.getDisplayValue(), true);
if(diff<0){
gr.state = 2; // state set to inprogress
gr.work_notes = "Off hold date is passed";
gr.update();
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2023 05:23 AM
Hi @Vani14,
There is a field Run as on the Scheduled Job table, might not be in the default view.
You could select System Administratr as the Run as user.
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.