How to disable export option from list view

isoorajsingh
Tera Contributor

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

8 REPLIES 8

Namrata Ghorpad
Mega Sage
Mega Sage

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

isoorajsingh
Tera Contributor

Hi Namrata,

I am aware about this method, but we don't want to make any changes in global scope


Amit Gujarathi
Giga Sage
Giga Sage

Hi @isoorajsingh ,

I trust you are doing great.

Here are the steps to achieve this:

  1. Create a new UI policy on the custom table.
  2. Set the 'Action' as 'Hide' for the 'Export' button.
  3. Set the 'Condition' as 'true' to hide the button for all users by default.
  4. Create a new Access Control List (ACL) for the 'Export' operation on the custom table.
  5. Set the 'Role' field in the ACL to the specific role that is allowed to export data.
  6. 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



isoorajsingh
Tera Contributor

Hi @Amit Gujarathi 

Do you mean "Execute" operation ACL ? in 4th point that you mentioned above !!