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 error while navigating back in webpage containing IAC

SA-29349

Summary



When the browser back button is clicked, an error message is displayed in the PEGA gadget embedded in the external website.


Error Messages



"This action is not allowed as it is outside the current transaction." is displayed on screen


Steps to Reproduce

  1. Implement IAC where the pega action will be to create a work item. This work item traverses through a screenflow which three stages-Stage A,Stage B and Stage C.
  2. Include the JS files in the html pages of the website.
  3. The PEGA Gadget is rendered and the work item is created.
  4. Navigate to the next stage of the PEGA work item.
  5. Click the back button of the browser.
  6. "This action is not allowed as it is outside the current transaction." is displayed on screen


Root Cause



When the browser back button is hit, browser actually tries to retrive the session from the history. We actually donot store any sessions, so it throws that error message.

Resolution



Here’s the explanation for the reported behavior:

Suggested user to use following ways to prevent / alert the users from navigating back:
  1. Insted of running directly running the Screen flow directly, Use a modal dialog in the flow and complete the screen flow in the modal dialog.
  2. You can write an custom JS using "window.onbeforeunload" event to restrict the user from using the back button by poping the alert message.
  3. If you want to goto previous page from where this page is triggered, you can use the window.history class and configure exactly to which page it should go. 
Suggest Edit

Published October 29, 2016 - Updated December 2, 2021

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