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

Error coming when multiple buttons are clicked

SA-26143

Summary



When the user clicks on Save button and then clicks on submit, the screen becomes stale until it is refreshed.
 

Error Messages



"This action is not allowed as it is outside the current transaction" and

"ERROR: posted transaction id 'XXXXXXXXXXX' for frame 'pyWorkPage' DOES NOT match record 'YYYYYYYYYYYY'"


Steps to Reproduce

  1. Click on Save button
  2. Click Submit in User Portal


Root Cause



An issue in the custom application code or rules as buttons clicked within milliseconds apart

Resolution



Local change that resolves the issue by disabling other Submit/Save buttons as below:
 

Disable the submit button on click on save button and vice versa. The following is a javascript api which will disable save/submit buttons based on the ids. Ids can be configured on the button configuration panel. This javascript function we can call using RunScript action before Save action. Please refer attached screen shot for configuration changes. 

Here is the script to disable button and can be placed in "UserWorkForm" HTML fragment. 

<script> 
function disableSubmitOrSaveButton(btnId, SourcebtnId) { 
var btn = $("button[data-test-id='" + btnId + "']"); 

if (btn && btn.length >= 1) { 
btn.attr("disabled", "true"); 
btn.attr("data-click", ""); 


if (SourcebtnId) { 
btn = $("button[data-test-id='" + SourcebtnId + "']"); 
if (btn && btn.length >= 1) { 
btn.attr("data-click", ""); 



</script>


Then you must configure your buttons to use these functions as below:



 

 

Published August 5, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

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

Did you find this content helpful?

Want to help us improve this content?

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