Issue
Description
How to remove/hide UI action on the related list for specific role user
For Example:
Remove/Hide right click "Approve" option (List context menu option) for the users with "itil" role on the table "Requested Item(sc_req_item)".
As shown in the image above, we want to remove/hide the "Approve" option for the itil users.
Procedure
- Navigate to the sc_req_item.LIST (table on which the user can perform "approve" UI action)
- Notice that the List contect menu UI action "Approve" belongs to the table "sysapproval_approver"
- Navigate to UI action and apply filters: table is "sysapproval_approver" AND List Contest Menu is "True"
- Open the UI action with Name "Approve" and change the condition to "!gs.hasRole('itil')" to restrict this Ui action from users with itil role
By following the above steps, we are modifying the UI action condition to make it visible to only the users with the required roles.
Applicable Versions
All
Additional Information
To learn more about the UI actions, please refer the below document:
https://docs.servicenow.com/csh?topicname=c_UIActions.html&version=latest