How to Add Activity Stream to "Export to PDF" in Service Portal Incident Form

Kevin McGartlan
Tera Contributor

Hello, 

I am looking into customizing the "Export to PDF" option on the hamburger menu of the Incident form on the Service Portal. Right now in our SP, we only see the fields on the form when we export to pdf. We would like to add the Activity Stream (additional comments and work notes) to the exported pdf. What options do we have? 

I have tested our regular Platform UI, and we are able to see the attached activity steam when exporting to PDF. I'm not sure if that's a red herring, but thought there might be a separation between platform ui and SP ui actions. 

Thank you!

4 REPLIES 4

Josh Virelli
Tera Guru

Hey Kevin,

I just tested on both Platform and Service Portal and both Exports included the Activity Stream. From what I can tell, they both use the PDF web service so the results should be the same. I could be wrong here though.

Can you confirm that you are using the same ticket and user to export these PDFs. Also, are you using the Out-of-the-Box Form widget? (widget id is widget-form and its name is Form).

Check these lines in your form widget to make sure it's hitting that PDF web service. It's line 40 and 41 for me in Madrid.

find_real_file.png

If my answer helped you, or is correct, please mark it as 'Helpful' or 'Correct'

Thanks,

Josh

Hi Josh,

 

Are you still using this solution for exporting the activity log of a ticket? Also, do you have any visuals on this working? I'm looking for an answer to this exact question. Any help would be great!

ebbrostrom_sn
ServiceNow Employee
ServiceNow Employee

This is a bit old of a conversation, but this may help... Could add the 'Audit History' related list to the specific view your trying to export. The Activity Feed is just rendering the audit infromation, its not a true field on the form which the PDF is attemptign to do. Adding the Audit History related list will show all auditable content in a historical timeline via the related list, therefor added to the PDF export.

I'd recommend having a specific view for the PDF export, which then can be controlled directly and called via something like this...

instanceName+sysparm_table + '.do?PDF&sys_id=' + sysparm_sys_id + "&sysparm_view=PDF"; 

MPNSC
Tera Contributor

Hi can you tell me how you did this for Platform UI? Activity Stream isn't being printed when I export the record to PDF. I could add Work Notes and Comments to form but then it's two separate fields and won't have the chronological order display of Activity Stream