Forum Stats

  • 3,769,694 Users
  • 2,253,008 Discussions
  • 7,875,154 Comments

Discussions

Warn on Unsaved Changes apex.item level not working properly?

Christopher C
Christopher C Member Posts: 54 Red Ribbon

Hello,

I am working on setting up a warning on page leave if there are unsaved changes. My Warn on Unsaved changes is set to enabled on the Navigation level.

The page has one main table (Project) with page items. These page items have the Warn on Unsaved Changes set to Page Default and are working properly.

The other part of the page is Tasks and People. There can be multiple tasks within a Project and there can be multiple people linked to a specific task. On page load, the list of existing tasks [and sub items - PEOPLE] are loaded into a APEX_COLLECTION table with different collection names and are linked based on SEQ_ID. This part of the page is run by a select list of Tasks (P1_TASK_ID). So when this select list is changed, the items are set and the grid with people is refreshed based on the new P1_TASK_ID. All of the Task Items have the Warn on Unsaved Changes set to Ignore. In order to capture these changes, I am doing a separate DA to update a different page item that has Warn on Unsaved Changes set to Default once the collection is changed. This is working properly.

The Problem:

When I change the P1_TASK_ID to a different task and the DA runs to switch the page item values/refresh People report, a few items apex.item('P1_TXXX').isChanged() equals true and the Warning on page exit is triggered. This is occurring even though the Unsaved Changes is set to Ignore. Are there any known issues with this? Has anyone successfully set up page warnings with the setup described above?

Please let me know if I can add anymore information.

Product Build 20.1.0.00.13

Schema Compatibility 2020.03.31

Answers