Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

"You are about to replace an open..." is shown on doClose call

SA-4764

Summary



An Additional popup ("You are about to replace an open work item which has changes that has not be saved") is coming in Pega 7.1.5 on calling doClose from an action tab of button. This alert did not appear in PRPC 6.2SP2.

Error Messages



None

Steps to Reproduce



1. Create a section with a two buttons.
2. Configure a "refresh" and "runScript" on the "Save" button. The "refresh" refreshes the current section and  script calls "doClose"
3. Configure a "cancel" and "runScript" on the "Cancel" button. The script in this case also calls "doClose"

On launching the work object in Pega 7.1.5, the Save button puts the alert(it did not in PRPC 6.2SP2) before closing the work object. The alert is needed in case of the "Cancel" to warn users in case of any unsaved changes.


Root Cause



The root cause of this problem is a backwards compatibility defect in Pegasystems’ code/rules.  isFormDirty and doClose functionality has changed causing the new behavior.


Resolution



This issue is resolved through the following local change:

Add the following function to UserWorkForm
HTML fragment

   function clearDirtyOverride() {        
              pega.u.d.gDirtyOverride = false;
      return;
    }


Call this function via "RunScript" after the "Refresh" and before the "doClose"





 
Suggest Edit

Published January 31, 2016 - Updated October 8, 2020

Did you find this content helpful? Yes No

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us