FRM-41106 You cannot create records without a parent record.
WoMoSep 21 2010 — edited Sep 22 2010Hello!
Forms 6i.
I have a Parent-Detail-Relationship. At the Detail-Block a "When-create-record" sets some default values on the Detail-Block.
I got error "FRM-41106 You cannot create records without a parent record" when the Parent-Block executes a execute_query.
I debuged the problem an found out, that the error appears in the standard-programunit "Clear_All_Master_Details".
The error appears, when the code is deleting the detail-block "code: Clear_Block(NO_VALIDATE)".
This is strange: The error appears only when I uses the "When-create-record"-trigger on the detail-block.
If a comment out the trigger, no error appears.
Why Is a "When-create-record"-trigger initiated when deleting the detail-block?
Default-Code of "Clear_All_Master_Details":
-- Clear all the detail blocks for this master without
-- any further asking to commit.
--
currel := Get_Block_Property(trigblk, FIRST_MASTER_RELATION);
WHILE currel IS NOT NULL LOOP
curdtl := Get_Relation_Property(currel, DETAIL_NAME);
IF Get_Block_Property(curdtl, STATUS) <> 'NEW' THEN
Go_Block(curdtl);
Check_Package_Failure;
Error appear here----> Clear_Block(NO_VALIDATE);
IF :System.Block_Status <> 'NEW' THEN
RAISE Form_Trigger_Failure;
END IF;
END IF;
currel := Get_Relation_Property(currel, NEXT_MASTER_RELATION);
END LOOP;
Thx in advance,
Wolfgang