Support Article
The dirty pop-up window button is disabled for the first time
SA-14174
Summary
The discard, save and close buttons, which appear when a partially filled work object is closed, is disabled at users end due to which they are not able to close the work object until a refresh is done. After a refresh, the button's become enabled. User is facing this issue after upgrading from PRPC 6.1 SP2 to Pega 7.1.7.
Error Messages
Not Applicable.
Steps to Reproduce
1. Create a composite portal having role as user.
2. Create a new work and fill it partially.
3. Close the work object by clicking Close. It is noticed that the button (Discard, Save and Cancel) that appears in a pop up stating that "You are about to close an open work item which has changes that have not been saved" is disabled.
Root Cause
Discard, save and close buttons are disabled in the dirty popup for the first time.
Resolution
The below code snippet in userworkform solves the reported behaviour:
<script>
function enableDirtyPopupButtons() {
$('[node_name="pyDirtyCheckConfirm"] button').prop( "disabled", false);
}
/* When the DOM is loaded invoke harness_execute */
$(function() {
// Attach to harness onloads
var e = window.event;
pega.u.d.harness_execute(enableDirtyPopupButtons, true, e);
});
</script>
Published September 22, 2015 - 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.