Background info:
I have a form page and report page that are linked to two tables:
REASON_CODES
ID|NAME|PARENT_ID
This is a list of available reason codes for an issue entry. The PARENT_ID field allows the user to assign a parent/child relationship between codes.
ENTRIES
ID|RC1|RC2|DESCRIPTION|DATE
This table contains all information for an issue entry (this is the main table for the form and report). The 'RC' columns refer to parent and child reason code IDs, respectively.
On the Apex form, the RC fields are both text fields with autocomplete. Since these fields have no native cascade ability, we had to force such a relationship in the LOV definitions:
RC1:
SELECT ID
FROM REASON_CODES
WHERE PARENT_ID = 0
RC2:
SELECT ID
FROM REASON_CODES
WHERE PARENT_ID = :p67_RC1
There was an issue in getting the RC2 LOV to populate, as it is dependent on the value in RC1. To help with this, an 'Update' button was added beside RC1 that submits the page without recording the entry on its table. After clicking 'Update' the LOV for RC2 correctly displays.
Issue:
The user selects an existing entry from the report page to edit and changes RC1 and presses 'Update' per their instructions. If they save the changes they have made, this works well. However, if they realize that they did this in error, they would press 'Cancel' instead. If they then go back into this entry from the report (or if they go into a completely different entry), the form field displays what had last been entered instead of what is in the database entry. This only resets if I save the entry or log out and start over.
Any thoughts on what could be causing this?