
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2018 02:18 AM
Hello guys,
I am having a hard time figuring out what's wrong with my SLA stop condition as it does not seem to move into 'Completed' Stage.
Here is my Stop Condition, the SLA should Stop after the Incident is Closed.
Here is my paused condition, The SLA will pause when the 'Job Order' is in 'Pending, Engineer on Transit, Resolved, Closed, Cancelled and Closed Incomplete'.
My thoughts are the stop condition cannot locate the right 'State' values in incident because they are in Integer but when I use a business rule in Job Order to Auto-close the Incident the SLA is changing to 'Completed' Stage.
The value of 'Closed' in Incident is 36 but when I search it in Stop condition filter, it's not there
Is there a way to change the choices to integer when choosing the stop condition filter?
Here is a sample of the Process
If the JO is closed
Then once the Incident is Closed
The Task SLA of JO should be completed
Any help is gladly appreciated. Thank you.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
-
Team Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2018 05:56 PM
The SLA engine will only run if the record gets updated (Job Order).
So, when the Incident status changes to close, the SLA will not recalculate the conditions until the Job Order record is saved.
You could work around this by adding an After Business rule on Incident:
When Status change to closed
Look up the related Job Order and add something to the work notes (or use forceUpdate) to make the SLA recalculate.
Something like this:
var grJob = new GlideRecord('your_table_name_here');
if(grJob.get('incident',current.getValue('sys_id'))) {
grJob.work_notes = "Incident closed, Stopping SLA");
grJob.update();
}
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2018 02:29 AM
In Pause condition, it is only "State" but in Stop Condition it is "Incidnet.State". Try to select the same "State", might work.
Thanks,
Ragavendran R

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2018 05:38 PM
The Pause condition is when the Job Order State is Closed, Cancelled, etc, while the Stop Condition is when the State of Incident is Closed. Is it possible if the pause and stop condition consists of two different tables?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2018 10:30 AM
Hi,
Select Table as Incident
Regards,
Ajay

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2018 05:39 PM
Hi,
Won't that put the task sla in Incident rather than Job Order?
Regards,
Raph