We are creating a encrypted url and its being loaded by our customers to perform executions. When an execution is performed if by mistake they click on reload then we have to avoid running one pre Data Transform which results in creating unique identifier for that execution.
To achieve this we thought we can store a value in browser session storage and set some value of clipboard page(pxRequestor), which we can use before the decryption of the url happens and harness loads.
Since harness loads after the execution of Preprocessing DT, we are not able to check the value retrieved from session storage and avoid the execution. Can someone suggest how to execute the script before harness loads? or any alternative to this approach.
@PareshN5090In the user work form we used the following code.
var Reload=false;
const container = document.querySelector(“div[node_name=‘Perform’]”);
if (container && typeof container !== “undefined”)
{
if(sessionStorage.getItem(‘reload’) === null)
{
sessionStorage.setItem(‘reload’, ‘true’);
}
else
{
Reload=true;
}
var oSafeUrl = new SafeURL(“@baseclass.SetResetFlags”);
oSafeUrl.put(“Reload”,Reload);
pega.u.d.asyncRequest(“POST”, oSafeUrl,{ success: function (o) {}
});
}
SetResetFlags is the activity which actually sets the value in pyTempText on pxRequestor page, which we are using in the Pre processing DT to avoid generation of ID.