I have Declare Expression to Calculate values on Modal Dialog, and Refresh sections on Modal Dialog refreshing the Modal Section. Once the Declare Expression is triggered values are set on the clipboard, same thing with refresh section ("Disable on Submit check box unticked") once the section is refreshed values are posted to the clipboard. So if i click Cancel Button Pega wont do rollback to previous data.
***Edited by Moderator Marissa to update platform capability tags****
Once the values are updated in the clipboard, OOTB cancel button does not revert back to original state.
To achieve your requirement, you can try below approach:
1. Create duplicate page.
2. Perform the modal window action on that duplicate page.
3. Once canceled, remove the page. If clicked on submit, then update original page with duplicate page. This can be done by customizing the Cancel and submit buttons.
Once you done with Modal Template , as a next action item - Add a Refresh Harness by adding the activity "RefreshOnConflicts" - which will Refreshes the current assignment if it is valid or else displays review harness.