PDF Export Without Related Lists

stevejarman
Giga Guru

Hi - this topic has been hinted at here and there but I haven't found a solution as yet.

I have a custom view for our Incident form which is the "Customer PDF Export" view. It's basically a limited information view of the incident, and onLoad, it uses g_form.hideRelatedLists() to... hide the related lists. All works fine.

Problem is, when you them export that to PDF using the built-in context menu, the related lists show up in the PDF.

Does anyone know if there's a way to correct this behaviour, OR - failing that - some other way to customise the PDF output?

1 ACCEPTED SOLUTION

venkatiyer1
Giga Guru

Hi Steve,



These are the steps you might want to try out in order



1. Create   a new view say Print from Form Layout and ensure only the sections you want is there and save


2. Go to the Print view. Then right click again on the form and go to related lists. Remove the related lists for this view and save.



Then you would be able to access the print without related list say using a url



instance.service-now.com/nav_to.do?uri=/incident.do%3Fsys_id%3D282c3edc4f9256007e04c4b18110c7e9%26sysparm_view%3Dprint%26PDF




Replace the instance with your instance name, view with the view name your prefer and the sysid accordingly. %26 is the & equivalent.


View solution in original post

5 REPLIES 5

venkatiyer1
Giga Guru

Hi Steve,



These are the steps you might want to try out in order



1. Create   a new view say Print from Form Layout and ensure only the sections you want is there and save


2. Go to the Print view. Then right click again on the form and go to related lists. Remove the related lists for this view and save.



Then you would be able to access the print without related list say using a url



instance.service-now.com/nav_to.do?uri=/incident.do%3Fsys_id%3D282c3edc4f9256007e04c4b18110c7e9%26sysparm_view%3Dprint%26PDF




Replace the instance with your instance name, view with the view name your prefer and the sysid accordingly. %26 is the & equivalent.