- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-28-2016 10:39 AM
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.
Solved! Go to Solution.
- Labels:
-
Personal Developer Instance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-29-2016 10:58 AM
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:
- Create a UI action on the incident table with the same Action name. If the Action name is not defined, use the same Name.
- 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')
For more details on overriding UI actions, visit: UI Actions - ServiceNow Wiki
Thanks,
Rafi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-28-2016 05:17 PM
Hi John,
sure, actually Save button is not visible to any user in change module except if you have change coordinator role or assignee of the change. But still user can save it from context menu on the form which seems to be a defect as if save is not to be visible to users as per change process then it should not be visible from form context menu as well
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-28-2016 05:29 PM
Thanks for the clarification. Yes, it seems clear now that you need to do this:
- Look for the UI Action that's hiding Save from the form.
- Look for the UI Action that's showing Save in the context menu.
- Make sure the Condition from #2 mimics that of #1.
OOB, Save buttons are defined using Table = Global (meaning all tables). I'm not sure if your admin has modified this or created a new one. You may have to do some testing to find UI Actions for #1 and #2 above. Please let me know if you need further help.
FYI, UI Actions have these checkboxes that specify if it applies to Form, Context Menu, or both:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-29-2016 09:22 AM
Hi John,
Thanks,
Is there any thing else except UI action which is hiding.
As I couldn't find the UI action for #1 and #2
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-29-2016 09:29 AM
Although there are ways to hide UI Action's button/context menu/links using DOM manipulation, I'd say it's not a good practice so, hopefully, unlike in your case.
Have you looked into Table = Global? As mentioned, both OOB Submit and Save UI Actions are defined Globally, not to the Change Request table specifically:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-29-2016 09:30 AM
Do you know the role name of the change co-coordinator role? Perhaps we can look for that.
