问题
I have your standard Oracle apex page to create / edit / delete a record.
I now wanted to call a stored proc when a new record is created (only on INSERT, not update/delete), so I created a Process on the page and tied it to the create button.
All is well so far....it calls the stored procedure as expected as verified by the debug messages I put in there. However, I wanted to pass the new PK created as part of the new record to the stored proc. However it is receiving null.
The process I created is set to run "On Submit - after Computations and Validations" which I think is right.
Can someone suggest why I might not be getting the new key? Is it still not available yet at that point in the form processing?
Any help appreciated.
回答1:
If you are using a standard Apex "form on a table", then you can set the Return Key into Item
property of the Process Row of ...
process to specify a page item that will get populated with the PK of the inserted row:

You can then reference the item in your procedure call.
来源:https://stackoverflow.com/questions/7689620/how-to-pass-new-pk-to-stored-proc-in-oracle-apex