How to remove "Export" in Context menu based on roles?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2023 05:25 AM
Hello guys,
Just wondering, is there a way to remove the "Export" option in the context menu based on roles. I tried to do that in the "UI context Menus" but it seems not working.
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2023 05:34 AM
Hi Hai Long Do,
Kindly use the link provided below for reference.
Open the table sys_ui_context_menu and search Export.
Please add the following code to the condition.
!ListProperties.isRelatedList() && !ListProperties.isRefList() && ListProperties.getTable() != "your custom table name"
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0676119
I hope that the above information is useful to you. Let me know if you have any further questions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2023 05:40 AM
Hi,
I just want users who do not have a specific role could not export the record. I don't think that ListProperties.getTable() != "custome table" can solve it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2023 06:06 AM
We can add the required role to the condition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2023 06:13 AM
I tried that before but the PDF option still exist