Support Article
Warning Popup for Temporary Work Objects
SA-14774
Summary
The warning popup occurs even when transitioning away from a screen coupled to a temporary Work Object.
"You are about to replace an open work item which has changes that have not been saved.
Press OK to continue and lose your changes.
Press Cancel to return to the modified form."
Steps to Reproduce
- Open a temporary work object within flow processing.
- Modify a field in the section containing values coupled to the temporary workobject.
- Close the temporary work object.
- Observe the pop up warning.
Root Cause
The Out-Of-The-Box behavior is to warn the user if the work object in question has updates which have not been saved to the database regardless of temporary status.
Resolution
Perform the following local-change:
Update the rule UserWorkForm with the following code block:
<script>
var tempObj = "<pega:reference name='.pyTemporaryObject' mode='normal' />";
if (tempObj == "true")
{
if (parent && parent.pega && parent.pega.u && parent.pega.u.d) {
parent.pega.u.d.gDirtyOverride = false;
}
pega.u.d.gDirtyOverride = false;
}
</script>
Published January 31, 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.