How to remove 'Save' button from the Change Task tab in Change forms

Rebecca L
Tera Expert

I have a requirement to prevent users from being able to create change tasks.  Our users have been doing so by using the 'New' and 'Save' buttons on the Change Task tab.  Removing the New button was simple as there is a checkbox in the List Control to do this globally.  However, removing the 'Save' button does not seem to be as simple.  I have been reading older threads that seem to be related to this but have not found a solution.  There is not a UI Action named 'Save' on the change_task or task tables to disable the button globally.  Is there another way?

1 ACCEPTED SOLUTION

Xavier Cordero
Kilo Sage

Hello Beclyn,

In order to remove the ability for users to save records within the table, edit the "create" ACL for the given table. By doing this via ACL you are ensuring that they cannot create new records within the table.

To do this:

1. Navigate to "Access Control(ACL)" Module.

2. Locate the existing create ACL for change tasks.

3. Open the record which states "create" under the "Operation" column and "change_task" under the "Name" column (the one shown below).

find_real_file.png

4. Elevate your privileges to Security Admin (required to edit ACLs).

5. From the Requires role list within the form, remove 'itil' and add 'admin' (you will want to have a role there or it will take it as the table not requiring any role).

 

The ability for users to create new records within the table will now be gone. Buttons such as "Save" won't be available for users to create new records, as these buttons check the ACLs to decide if they show up or not (image of the button checking for the ACL below):

find_real_file.png

View solution in original post

7 REPLIES 7

Jace Benson
Mega Sage

What is the condition of your "Save" UI action?

OOB on my PDI I don't see that UI action.

 

My guess, the Global "Save" ui action has some code that was customized and there was an upgrade that skipped an update.

This is where I'd start my search, "https://dev69973.service-now.com/sys_ui_action_list.do?sysparm_query=nameLIKEsave%5EtableLIKEglob%5Elist_button%3Dtrue" replace the instance with yours of course.

It seems your guess is correct.  It looks like several Global Saves were edited years ago.  I'd like to know what it would look like OOB.  I will look at the previous versions to see how to work it out.  Thank you!

Xavier Cordero
Kilo Sage

Hello Beclyn,

In order to remove the ability for users to save records within the table, edit the "create" ACL for the given table. By doing this via ACL you are ensuring that they cannot create new records within the table.

To do this:

1. Navigate to "Access Control(ACL)" Module.

2. Locate the existing create ACL for change tasks.

3. Open the record which states "create" under the "Operation" column and "change_task" under the "Name" column (the one shown below).

find_real_file.png

4. Elevate your privileges to Security Admin (required to edit ACLs).

5. From the Requires role list within the form, remove 'itil' and add 'admin' (you will want to have a role there or it will take it as the table not requiring any role).

 

The ability for users to create new records within the table will now be gone. Buttons such as "Save" won't be available for users to create new records, as these buttons check the ACLs to decide if they show up or not (image of the button checking for the ACL below):

find_real_file.png

Sanjay Bagri1
Tera Guru

Hi ,

 

The following should do the trick:
http://wiki.service-now.com/index.php?title=UI_Actions

Towards the bottom:
Overriding or removing a UI Action for an extended table

If a UI Action is defined on the task table, it will apply to all tasks, including incidents, changes, problems, etc. Same with a "global" UI Action. It is possible to override such a UI Action for a specific table, say the incident table.

Example: To override a higher-level task UI Action and have different behavior for just the incident table, create a UI Action on the incident table with the same "Action name". If the higher-level UI Action does not have an Action name, simply give your new UI Action the same Name.

To have different behavior for the incident UI Action, simply write a different script. To completely remove the UI Action from just the incident table, and have it not show up at all simply put a condition on your UI action of "current.sys_class_name == 'incident'".

 

and also go once bellow link :

https://community.servicenow.com/community?id=community_question&sys_id=56e303e5dbd8dbc01dcaf3231f9619e0

 

Mark the comment as correct if it is helpful for you and closed this thread so other also benefited for same questions .

Thanks
Sanjay Bagri

||DxSherpa Tech. ||