This content has been marked as final. Show 8 replies
If you created a master detail relationship based on the primary key (HEADER_ID) then once the master is populated, forms will automatically populate the detail record with that same value. You should be able to open the property pallet of the DETAIL.HEADER_ID and see the MASTER.HEADER_ID value in the "Copy Value from Item" property.
Thanks for the reply
Yes the relationship is created on the basis of primary key of Header_id and Yes in the detail fiedl Copy from I can see the reference of master table primary key, but still in the detail table foreign key is going as null and is not getting value of the primary key in the master table.
any further idea?
Trigger for the table ,
before insert on master
for each row
select seq.nextval into :new.header_id from dual;
and the join condition for the master detail block is
and on the pre-insert trigger of master data block there is only one line to update the WHO columns in the APPS tables.
Instead of using a database trigger, use the PRE-INSERT trigger in the master data block to populate the HEADER_ID.
In the PRE-INSERT trigger you would have a line like:
When you do that in the PRE-INSERT trigger it will will populate the item in the MASTER block which will in turn populate the item in the DETAIL block(s).
select seq.nextval into :MASTER.HEADER_ID from dual;