Master detail problem [message #181825] |
Tue, 11 July 2006 14:35 |
chimbs
Messages: 32 Registered: April 2005
|
Member |
|
|
Hi,
I have a form with 2 blocks.. blcok1 & block2 . both are database blocks.. a relation is created b/w block1(master) and block2(detail)..delete record behavior property: (Isolated)
My problem is
I have the following code
in key_commit trigger of form
go_block('block1');
delete_record;
before entering the above code i need to enter some comments on the block2 base table.
when i try to save it ( i need to delete the record from block1 and insert the newly added comment to block2). but because of the relation only my record is getting deleted from block1 base table but the comment is not getting inserted in to blcok2 base table.
hope my query is clear.. please give solution to my problem.
thanks
|
|
|
|
Re: Master detail problem [message #182101 is a reply to message #182070] |
Thu, 13 July 2006 01:19 |
|
Maaher
Messages: 7065 Registered: December 2001
|
Senior Member |
|
|
What you are telling does not make sense. Here's your relation:
BLOCK1 (MASTER)
|
|
V
BLOCK2 (DETAIL) Now you are trying to delete the master: what do you do with the orphan block2 records? Delete them too? Break the relationship by erasing (set to null) the fk field?
Besides, the KEY-COMMIT trigger will replace the default commit processing by your code. If you don't have a commit in there, no commit will take place.
MHE
|
|
|