Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Browser alert displays on click of Submit button

SA-61227

Summary



On click of the Submit button, browser alert displays instead of the Pega error.


Error Messages



Stay on this page or Leave this page.


Steps to Reproduce

  1. Create a flow, a flow action, and a section.
  2. Add a button to generate an editable Word document.
  3. In the section, include data and a Submit button.
  4. Run the flow. Generate the document and edit it.
  5. Do not save the document.
  6. Click the Submit button.


Root Cause



This behavior is as per Pega product design.

The Word document that opens on the click of the Generate button is enabled with live editing. The document opens in a new browser. Therefore, a temporary file is generated in the system when the document is edited. Hence, the browser displays an alert to save the document before proceeding with any other action.


Resolution



Perform the following local-change to suppress the browser alert:

Include the below script in the section with the Generate button.


<script>
window.onbeforeunload = null;
  window.alert = function() { return true; }
</script>
Suggest Edit

Published October 17, 2018 - Updated October 8, 2020

Did you find this content helpful? Yes No

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us