This content has been marked as final. Show 2 replies
taepodong wrote:This will only give the maximum ID and not the currently generated ID
I have a form built in APEX based on a table. The PK is generated by sequence and the form values are saved by DML (insert).
What I need to do is once I create a new entry with my from, I need to update a whole bunch of other tables with the new PK which I can easily do by creating a PL/SQL process after DML.
However, I need the primary key generated by by the new entry (created by filling up the form + submit).
One way around it is
to retrieve it but I am not sure if this is a good idea/practice.
Select max(userid) from user
Any idea guys? Cheers.Use this APEX feature
Edit your page > Edit you DML process for the form > Enter you page item into Return Key Into Item (this returns the new pk value generated by this form)