How hide cancel request option in esc and hr case form view for HR cases

Kalpana6
Tera Expert

Hi All,

 

How hide cancel request option in esc and hr case form view for HR cases

1 ACCEPTED SOLUTION

Sandeep Rajput
Tera Patron
Tera Patron

@Kalpana6 If this is about, not letting the opened for person to have a cancel case option on esc then you can use following configuration to hide cancel case option for opened for person.

 

Screenshot 2023-10-10 at 5.03.58 PM.pngScreenshot 2023-10-10 at 5.04.32 PM.pngScreenshot 2023-10-10 at 5.05.51 PM.png

 

For more information, please refer to the documentation https://docs.servicenow.com/en-US/bundle/vancouver-employee-service-management/page/product/human-re...

View solution in original post

2 REPLIES 2

Community Alums
Not applicable

Hi @Kalpana6 ,

"cancel Request" is a Global UI action, so if you are making any changes it will impact wherever can cel request ui action is used across the platform.

SandeepDutta_0-1696918721349.png

 

So if you want to hide it specifically for HR Scope, then do the below:

1. Find the UI Action that you want to hide in the sys_ui_action table.

2. In the condition field add the following script:

&& current.getTableName() != '<table name>'

3. Save the UI Action. 

4. Clear the instance cache by typing cache.do in the application navigator.

 

OR

 

1. Go to the global UI Action in the sys_ui_action table.

2. Change the table from Global to the table name that you want the UI Action to be hidden.

3. In the condition field, add a script that will never be true (For example ! current.canCreate() )

4. Right-click on the header and click ‘Insert and Stay’.

 

This will create another UI Action with all the same properties as the global one but overrides the global UI Action and hides it as well.

Make sure, the new UI action has the exact same action name and properties as the other. (Hence I advise the ‘Insert and Stay’ so that you do not have to change anything else other than the condition and the table. 

 

 

Sandeep Rajput
Tera Patron
Tera Patron

@Kalpana6 If this is about, not letting the opened for person to have a cancel case option on esc then you can use following configuration to hide cancel case option for opened for person.

 

Screenshot 2023-10-10 at 5.03.58 PM.pngScreenshot 2023-10-10 at 5.04.32 PM.pngScreenshot 2023-10-10 at 5.05.51 PM.png

 

For more information, please refer to the documentation https://docs.servicenow.com/en-US/bundle/vancouver-employee-service-management/page/product/human-re...