Rollback for changes made in a Modal Window
Usually Modal Window in Pega executes in the same context as the main work object. And if you made some changes in the Modal Window and then clicked cancel - they aren’t gonna be rolled back as well. Because once you submitted your changes to the Clipboard (e.g refreshed section inside of the Modal Window) - they are here to stay. In order to actually roll back changes - two approaches are available:
-
Execute modal window in the temporary top level page and in case of confirming them - copy top level page back to work object
-
Use OOTB extension pyModalPageCancelAction. Inside of that extension you can copy back all needed values from the original object stashed before: