How to disable export option from list view
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-12-2023 10:41 PM
Hi,
I want to disable export option from list view of a "custom table" only for the users who do NOT have a specific role,
I know that we can do that by changing condition in Export context menu in "sys_ui_context_menu" table, but we don't want to make any changes in global scope
Please suggest if there is any workaround for this
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2023 01:46 AM - edited ‎04-13-2023 01:52 AM
Hello,
Please refer he below link.
Open the table sys_ui_context_menu and search Export.
In the condition add like below
!ListProperties.isRelatedList() && !ListProperties.isRefList() && ListProperties.getTable() != "your custom table name"
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0676119
Regards,
Namrata
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2023 02:06 AM
Hi Namrata,
I am aware about this method, but we don't want to make any changes in global scope
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2023 02:24 AM
Hi @isoorajsingh ,
I trust you are doing great.
Here are the steps to achieve this:
- Create a new UI policy on the custom table.
- Set the 'Action' as 'Hide' for the 'Export' button.
- Set the 'Condition' as 'true' to hide the button for all users by default.
- Create a new Access Control List (ACL) for the 'Export' operation on the custom table.
- Set the 'Role' field in the ACL to the specific role that is allowed to export data.
- Set the 'Condition' field in the ACL to 'false' to prevent non-specific role users from exporting data.
This way, the 'Export' button will be hidden by default for all users, but the specific role users will still be able to see and use it due to the ACL.
You can refer to the following ServiceNow documentation links for more information on UI policies and ACLs:
Was this answer helpful?
Please consider marking it correct or helpful.
Your feedback helps us improve!
Thank you!
Regards,
Amit Gujrathi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2023 03:01 AM
Hi @Amit Gujarathi
Do you mean "Execute" operation ACL ? in 4th point that you mentioned above !!