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

Adding new page to page list does not trigger dirty state

SA-26479

Summary



Closing or cancelling case after adding new page to the page list should result in warning popup "This page is asking you to confirm that you want to leave...".

When a new row is added to a grid in the user portal this warning does not appear when the row has been added using a data transform run from a context outside of the grid.  For example a link or button outside of the grid.


Error Messages



Not applicable


Steps to Reproduce

  1. Add a new page to a page list.
  2. Close the page.


Root Cause



In doExplorerFormIsDirty function in pzpega_ui_doc_dirtyhandling JS, there is a check for presence of pega.u.NavigateTopHandler object.

If the object is present, the function returns false. 

In case of a lightweight dynamic container (present in User portal), the pega.u.NavigateTopHandler object is present; but it is not present in screen layout (present in Manager portal)  or normal dynamic container.

In case of single-document portals using lightweight dynamic container, for example User portal, the dirty confirmation is not shown by default.

Resolution


 
Set the flag through a script in the UserWorkForm HTML Fragment, to resolve the issue:
 
<script>
    function setDirtyOverride() {
        pega.u.d.gDirtyOverride = true;
    }
</script>
 

The below is the version from my test system that has resolved the problem.  You should add this script to the custom application version of UserWorkForm if one exists, otherwise you will need to save a copy into the application ruleset.



The flag can then be set via the Run Script action as shown below.

Published September 12, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

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

Did you find this content helpful?

Want to help us improve this content?

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