Hide "view" context menu option from the form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2023 07:13 AM - edited 04-17-2023 07:15 AM
Hi All,
I need to hide the "view" context menu from the form. It should only be visible for admin users. I have used following lines of code on context menu condition:
ListProperties.canChangeView() && gs.hasRightsTo('ui/context_menu.view/read', null) && gs.hasRole('admin')
but it's only hiding the option from the list view and not from the form. Attaching the screenshot for the details.
Is there any way that we don't remove view_changer role and hide this context menu option from form too?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2023 07:42 AM
Hi @Jaydee1 ,
Changing views is granted with the view_changer role on the user or group level. It is not table specific.
If that user is having the view_changer role then they will see that option
you can have view rules defined on that table and ITIL role consists of view_changer role.