SLA Not getting cancelled using script. Please help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2025 11:36 PM
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:
NOte:
Actually, I want to cancel that SLA and delete the record also.
Please help
Regards,
Lucky
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2025 11:38 PM
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]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2025 12:07 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2025 12:11 AM
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]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2025 11:39 PM
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.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader