CREATE OR REPLACE TRIGGER "EFT_NOM".cg$BIR_CONTACT_DETAILS BEFORE INSERT ON CONTACT_DETAILS FOR EACH ROW DECLARE cg$rec cg$CONTACT_DETAILS.cg$row_type; cg$ind cg$CONTACT_DETAILS.cg$ind_type; BEGIN -- Application_logic Pre-Before-Insert-row <> -- Application_logic Pre-Before-Insert-row << End >> -- Load cg$rec/cg$ind values from new cg$rec.CREATED_BY := :new.CREATED_BY; IF (:new.CREATED_BY IS NULL) THEN cg$ind.CREATED_BY := FALSE; ELSE cg$ind.CREATED_BY := TRUE; END IF; cg$rec.CODE_ID := :new.CODE_ID; cg$ind.CODE_ID := TRUE; cg$rec.DESCRIPTION := :new.DESCRIPTION; cg$ind.DESCRIPTION := TRUE; cg$rec.CREATED_ON := :new.CREATED_ON; IF (:new.CREATED_ON IS NULL) THEN cg$ind.CREATED_ON := FALSE; ELSE cg$ind.CREATED_ON := TRUE; END IF; if not (cg$CONTACT_DETAILS.called_from_package) then cg$CONTACT_DETAILS.validate_arc(cg$rec); cg$CONTACT_DETAILS.validate_domain(cg$rec); cg$CONTACT_DETAILS.ins(cg$rec, cg$ind, FALSE); cg$CONTACT_DETAILS.called_from_package := FALSE; end if; cg$CONTACT_DETAILS.cg$table(cg$CONTACT_DETAILS.idx).CREATED_BY := cg$rec.CREATED_BY; cg$CONTACT_DETAILS.cg$tableind(cg$CONTACT_DETAILS.idx).CREATED_BY := cg$ind.CREATED_BY; cg$CONTACT_DETAILS.cg$table(cg$CONTACT_DETAILS.idx).CODE_ID := cg$rec.CODE_ID; cg$CONTACT_DETAILS.cg$tableind(cg$CONTACT_DETAILS.idx).CODE_ID := cg$ind.CODE_ID; cg$CONTACT_DETAILS.cg$table(cg$CONTACT_DETAILS.idx).DESCRIPTION := cg$rec.DESCRIPTION; cg$CONTACT_DETAILS.cg$tableind(cg$CONTACT_DETAILS.idx).DESCRIPTION := cg$ind.DESCRIPTION; cg$CONTACT_DETAILS.cg$table(cg$CONTACT_DETAILS.idx).CREATED_ON := cg$rec.CREATED_ON; cg$CONTACT_DETAILS.cg$tableind(cg$CONTACT_DETAILS.idx).CREATED_ON := cg$ind.CREATED_ON; cg$CONTACT_DETAILS.idx := cg$CONTACT_DETAILS.idx + 1; :new.CREATED_BY := cg$rec.CREATED_BY; :new.CODE_ID := cg$rec.CODE_ID; :new.DESCRIPTION := cg$rec.DESCRIPTION; :new.CREATED_ON := cg$rec.CREATED_ON; -- Application_logic Post-Before-Insert-row <> -- Application_logic Post-Before-Insert-row << End >> END; /