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.

How to disable save option in form context menu

Mohammad Danis1
Giga Guru

How to disable save option in form context menu

User is not having change co-coordinator role, still he is able to save from form context menu.

1 ACCEPTED SOLUTION

There is a Global UI action for 'save' makes save option to be visible only in context menu.



A global UI action applies to every table. You can override a UI action for a specific table, in which case you must ensure that the action_name of both, the overriding UI action and the original UI action - are identical.


For example, to override a UI action on Task for just the Incident table:


  1. Create a UI action on the incident table with the same Action name. If the Action name is not defined, use the same Name.
  2. Enter a script that is specific to the Incident table.

What you need to do now is, create new UI action for change table which overrides this. You can use conditions to control UI action visibility by role. Ex: gs.hasRole('itil_problem')


temp.png



For more details on overriding UI actions, visit: UI Actions - ServiceNow Wiki



Thanks,
Rafi


View solution in original post

10 REPLIES 10

There is a Global UI action for 'save' makes save option to be visible only in context menu.



A global UI action applies to every table. You can override a UI action for a specific table, in which case you must ensure that the action_name of both, the overriding UI action and the original UI action - are identical.


For example, to override a UI action on Task for just the Incident table:


  1. Create a UI action on the incident table with the same Action name. If the Action name is not defined, use the same Name.
  2. Enter a script that is specific to the Incident table.

What you need to do now is, create new UI action for change table which overrides this. You can use conditions to control UI action visibility by role. Ex: gs.hasRole('itil_problem')


temp.png



For more details on overriding UI actions, visit: UI Actions - ServiceNow Wiki



Thanks,
Rafi