Support Article
Transaction Id mismatch error when opening WO after sync
SA-37746
Summary
When user opens any WorkObject (WO) during sync up , error "This action is not allowed as it is outside the transaction" is thrown and also after this if user open any other work objects they are getting the same error.
Error Messages
UI : This action is not allowed as it is outside the transaction
Logs : transaction id '89eaa8c1925d5658354e53abba7428f4' for frame 'pyWorkPage' DOES NOT match record '931c5074f518ec251dbf380081c1fc40'
Steps to Reproduce
1.Create offline enabled application.
2.Login to mobile app.
3.Open any work object and perform Finish Assignment.
4.Go to home page.
5.Click on synchronization icon.
6.During sync up open any workobject.
Root Cause
A defect in Pegasystems’ code or rules. After the synchronization, transaction Id is changed in server, but client side API is not updating the client side pega.u.d.url property.
Resolution
Perform the following local-change:
Add the following JS snippet in UserWorkForm :
<script>
pega.u.d.attachOnload(function() {
pega.u.d.getParameterByName = function(name, url) {
if (!url) url = window.location.href;
name = name.replace(/[\[\]]/g, "\\$&");
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, " "));
};
pega.u.d.switchThread = function(threadName) {
var url = this.url;
threadName = threadName.replace(/^([\s]+)|([\s]+)$/g, "");
var csrfTokenIndx = url.indexOf("/!@");
if (csrfTokenIndx > -1) {
var csrfToken = url.substring(csrfTokenIndx + 3, url.indexOf("!", csrfTokenIndx + 3));
threadName = "@" + csrfToken + "!" + threadName;
}
this.url = url.replace(/\!.+\?/, "!" + threadName + "?");
if(this.url.indexOf("?") != -1) {
// this.url = this.url.substring(0, this.url.indexOf("?"));
var transactionId = pega.u.d.getParameterByName("pzTransactionId", this.url);
this.url = this.url.replace("pzTransactionId=" + transactionId, "");
var fromFrame = pega.u.d.getParameterByName("pzFromFrame", this.url);
this.url = this.url.replace("pzFromFrame=" + fromFrame, "");
}
};
}, false);
</script>
Published May 24, 2017 - 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.