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

Saving data from a harness does not turn off the dirty flag

SA-14055

Summary



There is a button with a Click Action, that calls an activity to save the user data before clicking Cancel to close the harness, in a harness. Despite this, the Confirm close dialog appears. This occurs because the dirty flag is not reset.
 

Steps to Reproduce

  1. Open a work object.
  2. Update some data.
  3. Click the custom save button to save the data into the database.
  4. Click Close to close the work object.


Root Cause



An issue in the custom application code or rules. When tasks are performed in the harness then the dirty flag is set to true. Closing or refreshing this work object after that will display the dirty popup. It is an expected behavior.

Resolution



Perform the following local-change:

Reset the dirty flag after saving all the data by one line java script. 

pega.u.d.clearDirtyState()

This action should be the last action on the onclick event on the button.

Published September 11, 2015 - Updated October 8, 2020

Was this useful?

100% 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