Support Article
Dirty Check modal window hangs up after clicking save button
Summary
Application is upgraded from PRPC 5.5 to Pega 7.1.7. Composite portals with WorkArea control are used instead of latest Dynamic Container.
Whenever a partially filled work object tab is closed in a composite portal, Dirty check modal window is prompted with Cancel, Discard and Save options. The Cancel option works as expected but there are issues with Save and Discard options:
- When user hits the Save button the modal window gets struck and work object remains opened.
- When user hits the Discard button the modal window disappears but the Work object tab header alone remains open.
Note: These are out-of-the box (OOTB) buttons, only the section pyDirtCheckConfirm is specialized in their ruleset.
Error Messages
Save and Discard options not working.
Steps to Reproduce
- Open work object in a composite portal.
- Update some values.
- Close the work object tab without saving the changes.
Root Cause
The issue is due to WorkArea control used in this scenario.
Resolution
Use the following script mentioned in:
https://pdn.pega.com/support-articles/discard-button-renders-blank-screen
to resolve the behavior.
<script>
pega.u.d.attachOnload(
function() {
var x = pega.desktop.support.getDesktopWindow();
if(x && x.pega && x.pega.composite && x.pega.composite.MultiView && x.pega.composite.MultiView.prototype){
if(document.getElementById('pega_gadgetContainer')){
x.pega.composite.MultiView.prototype._unbindGadget = function(gadget, e) {
var gadgetName = gadget.gadgetName;
var doc = x.pega.web.api.doAction(gadgetName, "getUIDoc");
if (doc && gadget.actionDef.action.toLowerCase() != "display") {
if (!doc.doClose(e)) {
return false;
}
}
gadget.owner = null;
gadget.state = "free";
gadget.key = null;
gadget.doAction({
action: "blank"
});
return true;
}
}
}
}, false);
</script>
Published January 30, 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.