Hide Export Option within context menu?

Edwin Fuller
Tera Guru

Is there a way to hide or remove the "Export" option within the context menu?

find_real_file.png

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Edwin,



You can refer to my answer for below thread


Can we restrict user to click on group by link



This might be useful for you to hide the Export button itself. You can try it out.



Mark my reply as Correct and also hit Like and Helpful if you find my response worthy.


Thanks


Ankur


Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

10 REPLIES 10

tanumoy
Tera Guru

Goto the UI context Menu from the navigation panel. Search for the name = Export. Inactive that context menu.



Untitled1.jpg


Geoffrey2
ServiceNow Employee
ServiceNow Employee

Just to add to what Tanumoy said - it's on the sys_ui_context_menu table.   You could also add the gs.hasRole('admin') condition so that only Admins can see it.


Screen Shot 2016-09-10 at 1.23.48 PM.png


Ankur Bawiskar
Tera Patron
Tera Patron

Hi Edwin,



Do you want the "Export" context menu to be hidden only for specific table or the Options within it such as "CSV" or "Excel", "XML".



If you do not want to show "Export" button itself based on table i doubt whether you can achieve that. but for the individual buttons i.e. CSV, Excel etc you can do that


1) In left nav type UI Context menus and search name contains "Export"


2) Go to individual context menus under Export i.e. CSV or Excel and update the condition field as current.getTableName() !='sys_user_group';


4) So what it does is it hides the CSV or Excel when you expand Export for the table sys_user_group.


5) Replace table name with your table name



Screenshot below after updating the condition for CSV and Excel for Group table. The options for CSV and Excel are not visible when Export is expanded for Group table



export-1.JPG



Mark my reply as Correct and also hit Like and Helpful if you find my response worthy.


Thanks


Ankur


Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi Ankur,

 

I have similar requirement but to hide export option on three custom tables. And I am not able to include all 3 tables in the Export context menu Condition as there is limitation. How can I include all the 3 tables?