Firing trigger to insert id in a table
610101Oct 6 2009 — edited Oct 6 2009I 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