SLA Not getting cancelled using script. Please help

vijay39
Giga Expert

Hello all,

 

I have created a BR to trigger an SLA when Priority changes from 4 to 3.

But I also need to cancel another SLA that is getting attached for P3.

 

But it's not working.

Business Rule:

Before Update on Incident

 

Script:

vijay39_0-1740468918679.jpeg

NOte:

Actually, I want to cancel that SLA and delete the record also.

 

 

Please help

 

 

Regards,

Lucky

5 REPLIES 5

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @vijay39 

 

Did you try canceling the SLA via the list view? If there are only a few SLAs you want to cancel, try using the list view of the task_sla table.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Hello Atul,

 

I am using Task SLA table to cancel or delete the attached SLA.

Actually, I have created a new SLA and that has to be attached when Priority changed from P4 to P3 but not when Priority changed from P2 to P3.

 

Hence, I have written this.

 

 

Regards,

Lucky

Hi @vijay39 

SLAs are based on conditions, so if the condition matches, it will get attached. If the priority changes, you can either update the condition or leave it as is, because if the condition matches, the SLA will still get attached.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Ankur Bawiskar
Tera Patron
Tera Patron

@vijay39 

why not update the correct condition on the other SLA which you want to cancel so that system does this automatically and OOB and you need not have any script written for this?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader