How to cancel change request of another user in ServiceNow.

praveen_rajan
Tera Contributor

Hello everyone,

I have a requirement where members of the "App Engine Admins" group need to have access to cancel change requests created by any user. By default, only the user who creates the request has access to cancel their own record. Can anyone please assist me end to end for implementing this?

 

Thanks,

Praveen

2 ACCEPTED SOLUTIONS

ShubhamGarg
Kilo Sage

Hello @praveen_rajan ,

There are two ways by which cancellation can be done.

1. UI Action 2. Drop-down value in state field.

----

To restrict an UI action visibility, you can put your conditions in the 'Condition' field in UI action record.

Example - Suppose "I" button should be visible to only members of 'App Engine Admins' group. In that case, you can put below query in condition box (right above script box) -

 

gs.getUser().isMemberOf(sys_id of group);
OR
//Best Practice - Store sys_id of group in system property
gs.getUser().isMemberOf(gs.getProperty(name_of_sys_property_without_space));

 

This script will check if current logged-in user is member of assignment group on current record.

Similarly, For drop-down of state field, Using client script & script include, you can check membership and use g_form.removeOption function to remove state value.

In addition to this, you can abort the operation & show appropriate message using Business Rule if state changes to cancelled and current logged in user is not member of given group.

Hope it helps.

 

If my response helps you in any way, kindly mark this as Accepted Solution/Helpful and help in closing this thread.

Regards,

Shubham

View solution in original post

Hemanth M1
Giga Sage
Giga Sage

Hi @praveen_rajan ,

 

Go to UI actions>Cancel change

1)

HemanthM1_1-1724413317878.png

2) Add or condition to open the cancel button to "App Engine Admins" as highlighted below.

Make sure App Engine admins group has write access on the change request table

 

HemanthM1_0-1724413295285.png

 

Hope this helps!!!

 

 

Accept and hit Helpful if it helps.

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

View solution in original post

6 REPLIES 6

Thanks for your response @Hemanth M1 . 

praveen_rajan_0-1724417848560.png

I'm logged in as a system admin, and the admin is a member of the App Engine Admins group, but he is unable to see the button that you mentioned. Can you please assist me end to end for implementing this?

Hi @praveen_rajan ,

 

Its on the context , check here:

HemanthM1_0-1724421305212.png

 

and also would you share your "Cancel change" Ui action logic if its ok

 

 

Hope this helps!!!

 

 

Accept and hit Helpful if it helps.

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