- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2023 05:35 AM
Hi There,
We have closed few tickets from Background script but the SlAs haven't completed. They all breached. How to fix this and what might caused this issue?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2023 11:15 AM
Hi @chvdinesh ,
Have you used setWorkflow(false) in the background script?? if so that would have caused the issue.
If you want to fix the SLA breach > go to that SLA record and repair it, it would recalculated closed time and breach time.
Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2023 06:58 PM
Hi @chvdinesh
As you said you did closed them from the background script, I'm assuming that you used setWorkflow(false). Which will stop all workflows/flows/BRs as the SLA flow will not become aware of this event, it will not stop.
The possible solution is to repair the SLAs and if it didn't worked set the SLA record values like has breached, stage and completed time using another fix script.
Please mark my answer helpful and accept as solution if it helped you 👍✅
Anvesh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2023 11:15 AM
Hi @chvdinesh ,
Have you used setWorkflow(false) in the background script?? if so that would have caused the issue.
If you want to fix the SLA breach > go to that SLA record and repair it, it would recalculated closed time and breach time.
Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2023 07:05 AM
Hi @Hemanth M1 ,
Thanks for the response, the answer seems to be a valid one but it didn't worked for me. I'll investigate on that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2023 06:58 PM
Hi @chvdinesh
As you said you did closed them from the background script, I'm assuming that you used setWorkflow(false). Which will stop all workflows/flows/BRs as the SLA flow will not become aware of this event, it will not stop.
The possible solution is to repair the SLAs and if it didn't worked set the SLA record values like has breached, stage and completed time using another fix script.
Please mark my answer helpful and accept as solution if it helped you 👍✅
Anvesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2023 07:04 AM
Thank you @AnveshKumar M , the second approach worked for me.