Error when trying to download the Post incident report pdf from incident workbench

Steps to reproduce:

  • Impersonate the User experiencing the export issues
  • Open a major incident record that is in Resolved state
  • Click the "View Workbench" UI action on the form
  • Select the Post Incident Report tab
  • Click the "View Complete Report" button
  • On the next page that loads, click on the "Download report PDF" button

Expected: A pop up modal will appear showing " Export in progress" Querying your data. and then Export complete with buttons to Download or cancel

Actual: Error shows in pop up saying "Unexpected error occurred, Contact your system administrator."

Release or Environment

Noticed on Orlando release


There can be multiple causes for this issue but in this case the issue was caused by a custom Global UI Script.


The cause of the issue was a custom Global UI Script. Due to this whtp is giving the error while exporting to PDF.

With the UI script disabled we were able to export the PIR Report.

The issue was resolved by wrapping the customers script in the following code:
(if WHTP is doing something, do not run run this global UI script.)

if(window.location.href.indexOf('WHTP') == -1) {
//your script

The above fix was taken from WHTP Troubleshooting document

Article Information

Last Updated:2020-07-21 11:45:36