SLA not stopped

chvdinesh
Giga Contributor

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?

2 ACCEPTED SOLUTIONS

Hemanth M1
Giga Sage
Giga Sage

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.

 

 

Accept and hit Helpful if it helps.

Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025

View solution in original post

AnveshKumar M
Tera Sage
Tera Sage

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 👍

Thanks,
Anvesh

View solution in original post

4 REPLIES 4

Hemanth M1
Giga Sage
Giga Sage

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.

 

 

Accept and hit Helpful if it helps.

Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025

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.

AnveshKumar M
Tera Sage
Tera Sage

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 👍

Thanks,
Anvesh

Thank you @AnveshKumar M , the second approach worked for me.