Hi All,
Still "New" to Apex!
I am getting ORA-01403: no data found errors after deleting a row in a form in Apex 5.01 that was created from the interactive Report + Form template.
After searching the forum, I found direct reference to this situation:
ORA-01403: no data found On Deletion of a record
--------------------------------------------------------------------------------
Denes Kubicek Dec 9, 2014 1:40 AM (in response to 2805872)
After deleting a record, you should clear the cache of the page. If you don't the session state of the primary key item may keep the old value of the deleted record. The page on load process will try to fetch that value from the table and run into no data found.
---------------------------------------------------------------------------------
Unfortunately, I don't know where or how to "clear the cache of the page" after deleting a record.
I have seen reverence to APEX_UTIL.CLEAR_PAGE_CACHE but I'm not sure where to use it.
Still others say to set the value of the key column to NULL.
The Apex documentation says to use the URL:
2.9.3.2.2 Example: Clearing Cache on a Page and Passing an Item Value
This example shows how to implement an update form. It clears existing information and sets the item's value (typically a primary key).
f?p=6000:6003:&APP_SESSION.::NO:6003:MY_ITEM:1234
This example:
- Runs page 6003 of application 6000 and uses the current session ID
- Indicates to not show debug information (
NO)
- Clears all values maintained by the current session's cache for items on page 6003
- Sets the session state of an item called
MY_ITEM to the value 1234
But I'm not sure where or how to go about doing that in the context of the delete button.
Can anyone point me in the right direction? I'm trying to learn Apex using as much built-in native functionality as possible.
If clearing the page cache is what needs to be done after deleting a row, wouldn't that functionality have been built into the Delete button?
Thanks,
Mason