The CreatorCon Call for Content is officially open! Get started here.

How to remove "Export" in Context menu based on roles?

Hai Long Do
Tera Contributor

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!

7 REPLIES 7

Prashant Moily
Mega Sage

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.

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.

We can add the required role to the condition 

 

 

PrashantMoily_2-1695387902785.png

PrashantMoily_3-1695388004510.png

 

I tried that before but the PDF option still exist