Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

cancel conditon is not working in SLA on ritm table

nameisnani
Mega Sage

Hi Team , 

 

can anyone please help me on this issue , 

 

I have created SLA on sc_req_item table . 

 

pic 1 

nameisnani_0-1735527069678.png

 

 

pic 2 

nameisnani_1-1735527069575.png

 

 

pic 3 

 

nameisnani_2-1735527069674.png

 

 

 

I have tested this SLA , start , pause and stop condtions are working properly , the issue with cancel condtion . 

 

instead of cancel SLA stage is showing ' completed'  when ritm state is ' closed incomplete '

nameisnani_3-1735527069638.png

 

 

nameisnani_4-1735527069681.png

 

 

 

 

can anyone please help me on this issue on cancel conditon , what was the mistake , where i need to update please help me with the steps .

9 REPLIES 9

@nameisnani 

seems your setWorkflow(false) might be causing the issue

Did you try to deactivate that BR and see?

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

@Ankur Bawiskar 

 

i have only your script 

nameisnani_0-1735540754581.png

 

 

but still, sla is not cancelling .

Hi @nameisnani ,

 

As i said, check the history of the record, right click on header and see history like below. Just to confirm it didnt went to close before close incomplete. 

RunjayPatel_0-1735543873634.png

 

-------------------------------------------------------------------------

If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.


Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay

-------------------------------------------------------------------------

 

Hi @nameisnani ,

 

Why you need setWorkflow()? remove it from script and check.

Mark Manders
Mega Patron

I have the same results as Runjay. I set it exactly as yours and it got canceled. 

Check the SLA record itself. It has a 'Show SLA Timeline' related link. You can see what happened when.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark