typescriptguidewire

ListView Printing in PolicyCenter Cloud does not print and then breaks the UI when returning from the Print Dialog


I have added this Print/Export button to print the list of Policy Transactions to CSV. As far as I can tell, it complies with the instructions found in the Guidewire documentation.
enter image description here

However, when I try to use it, nothing happens. There are no error messages, nothing in the log, nothing on the screen.

enter image description here

When I click Return to Policy Transactions, the screen looks like this enter image description here

I tried calling both printListViewWithOptions and printListViewOnlyWithOptions, that did not seem to make any difference. I have used this without issue in ClaimCenter 9 and 10 and BillingCenter 10. The only difference there is that those are self-hosted. We are currently on Jasper version of PC Cloud.

Additional info Per the suggestions in the comments, I have tried in other browsers and have tried running gwb clean. I tried setting a break point on the action of the OK button, but it never got there. It looks like there is some sort of javascript/typescript error preventing the form from being submitted back to the server.

Uncaught SyntaxError: Failed to execute 'querySelectorAll' on 'Element': '[name=PrintOptions.Choice_Radio]' is not a valid selector.
    at GwFileRequest.ts:90:18
    at Array.forEach (<anonymous>)
    at GwFileRequest.ts:89:29
    at u.wrapWithParameters (GwFileRequest.ts:129:5)
    at u.submitForm (GwFileRequest.ts:72:10)
    at u.startDownloadRequestForEventSource (GwFileRequest.ts:35:10)
    at u.downloadHandler (gwFileValue.ts:352:47)
    at r.execute (GwFunctionWithContext.ts:5:22)
    at R.abstractOnEvent (gwEvents.ts:1297:49)
    at R.internalClick (gwEvents.ts:712:10)

enter image description here


Solution

  • It seems I should have double quotes around the attribute value.

    document.querySelectorAll('[name="PrintOptions.Choice_Radio"]');
    

    After editing the file .\modules\configuration\webresources\ts\core\GwFileRequest.ts to have double quotes around the selector's attribute value, I am able to get the csv to be created. enter image description here