Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to hide PDF export

Sota Kimura1
Tera Contributor

I want to hide the PDF export of the UI macro context_form_header.

Is it possible to hide PDF (portrait) and PDF (landscape) by editing the XML of the UI macro?
Please tell me how to do it if possible.

1 ACCEPTED SOLUTION

Hi,

I won't recommend updating that OOB UI Macro

If you still require you can play around with it

Regards
Ankur

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

View solution in original post

8 REPLIES 8

I think I can hide the export by customizing the UI macro (context_form_header)of the image

Hi,

I won't recommend updating that OOB UI Macro

If you still require you can play around with it

Regards
Ankur

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

Community Alums
Not applicable

Hi @Sota Kimura ,

You can open Context Menu [sys_ui_context_menu] table in menu System UI > UI Context Menus, filter by Name equal to Export and open the definition of Export menu.

By default the Condition of Export menu is

!ListProperties.isRelatedList() && !ListProperties.isRefList()

I suggest you to change the condition to

!ListProperties.isRelatedList() && !ListProperties.isRefList() && (ListProperties.getTable() != "sys_user" || gs.hasRole("admin"))

You should receive results, which you need: "Export" menu will be displayed in Users table only for admins. Other tables will hold "Export" menu.

Refer here

Mark my answer correct & Helpful, if Applicable.

Thanks,
Sandeep

 

Thank you
Unfortunately, I think the method you taught me is to disable the export of the context menu on the list screen.
I want to disable the export of the form screen after opening the record in the list screen.