Ui action "Cancel change" does not work for me !

yasserbouat
Tera Guru

Hello,

I am trying to click the ui action "cancel change" (available in the instance as out of the box ) but nothing happens, and i assigned to my self the roles itil, and sn_change_write, and still nothing : 

yasserbouat_0-1741093730902.png

 

yasserbouat_2-1741093790431.png

 

yasserbouat_1-1741093765600.png

 

2 ACCEPTED SOLUTIONS

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @yasserbouat 

 

Try canceling the change from the form, not from the list view, as there are a few mandatory fields that need to be filled before you can check the change.

*************************************************************************************************************
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]

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

View solution in original post

Hi @yasserbouat 

The condition involves the form, meaning this action works only at the form level, not at the list level. I would not recommend canceling the change from the list view, as it requires a reason, which is a mandatory field."

*************************************************************************************************************
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]

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

View solution in original post

7 REPLIES 7

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @yasserbouat 

 

Try canceling the change from the form, not from the list view, as there are a few mandatory fields that need to be filled before you can check the change.

*************************************************************************************************************
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]

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

Hi @yasserbouat 

The condition involves the form, meaning this action works only at the form level, not at the list level. I would not recommend canceling the change from the list view, as it requires a reason, which is a mandatory field."

*************************************************************************************************************
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

@yasserbouat 

your script won't work as you cannot use g_form in List UI action

1) have 1 UI action of type List Choice and other for Form context menu

2) for List UI action use this code and ensure UI action is server side. ensure you also set any mandatory fields if Change is cancelled

current.state = 4;
current.update();

Enhance for form button on similar lines

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

@Ankur Bawiskar 

It is not my script, it the by default script in the ui action