How to find which item has been changed in APEX


Requirement


You need to know which items have changed. This could manifest itself with a "Leave Site..?" message when you didn't think anything had changed.

TIP: If you've opened a modal, be aware that the item changed could be in the calling page, which confuses you into looking at the wrong page.

Without knowing this you can spend ages looking for something that has changed on the wrong page.

Solution


Open the web console and paste the following:

Object.keys(apex.items).filter((key) => apex.items[key].isChanged());


The console will then tell you which items have changed in session.

Acknowledgement

Comments