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!

Firing trigger to insert id in a table

610101Oct 6 2009 — edited Oct 6 2009
I am not able to insert the ID in CR_ID details when i press the create button in Apex Master detail form & Tabular form.

CREATE OR REPLACE TRIGGER COSTMAN."CM_RECIPE_T1"
BEFORE INSERT ON "CM_RECIPE"
FOR EACH ROW
DECLARE
L_ID NUMBER;
BEGIN
SELECT CM_RECIPE_SEQ.NEXTVAL INTO L_ID FROM DUAL;
IF :NEW.CR_ID IS NULL THEN
:NEW.CR_ID := L_ID;
END IF;
END;
/

Do i have to write a process in Apex form. This is a first time, i've come across a situation where i want the column to get populated using a trigger when pressing a Create button in an Apex form.

Please suggest..

Yogesh
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 3 2009
Added on Oct 6 2009
9 comments
1,794 views