Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to delete a record and then run plsql in IG

Cerberus WaitsNov 21 2019 — edited Nov 21 2019

Thanks in advance for taking the time to help me out.  The product build is 5.1.4.00.08.

I'm trying to run plsql procedure after saving an interactive grid.  The procedure works fine for adding/modifying a record.  However, when I try to delete a record, I get:

Ajax call returned server error ORA-20987: APEX - ORA-01403: no data found for .

I understand this is because I've deleted a record and then I'm trying to run code on a record that has been removed.  How do I get the procedure to run with the understanding that there is one less record?  At this point, I'm fine with telling my end user that deleting a record cannot be combined with other updates to the IG, which means separate 'Saves' for a delete and for an update/insert.

I tried creating a NO_DATA_FOUND exception in my procedure to stop it from running.  I tried setting up a condition in APEX that prevents the pl sql from running if :APEX$ROW_STATUS = 'D', and I tried preventing the sql from running if :APEX$ROW_SELECTOR = 'X'.

Any advice?

Comments

Post Details

Added on Nov 21 2019
0 comments
303 views