Please check the block properties, change commit behaviour as required.
> previous master block is getting commit as well beside commit for the second block.
That is how Forms works. You cannot commit a single block. COMMIT (or commit_form) commits all pending changes in the Forms, not just one block.
>the master block is not getting committed again.
The first commit has saved the changes. If there are no new changes in the master block, there will be nothing to commit.
Sorry for the wrong statement mention. In fact my master block is getting committed again by create another record in the table when I press the save button.
I think I have solved my problem by putting one trigger in the master block of on-update as null. This will not created another record in master block when I saved my detail block.
Have you defined the form as Master and Detail?
If you defined, then you can add new records to the detail table by query mode only. On querey mode the form not inserting one more record to master table. It just updates the existing record.
One more possible solution is
- Write a DB procedure, which will delete the record and call it instead of DELETE_RECORD;
- Write DB procedure which simply call COMMIT - nothing more. Call this procedure instead of COMMIT.
- Requery the detail block.