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
- 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.
- Include the JS files in the html pages of the website.
- The PEGA Gadget is rendered and the work item is created.
- Navigate to the next stage of the PEGA work item.
- Click the back button of the browser.
- "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:
- 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.
- You can write an custom JS using "window.onbeforeunload" event to restrict the user from using the back button by poping the alert message.
- 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.
Published October 29, 2016 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.