Support Article
Error coming when multiple buttons are clicked
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
- Click on Save button
- 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
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.