Saving problem while moving from database block to non database block [message #604156] |
Wed, 25 December 2013 05:37 |
|
yesh
Messages: 15 Registered: November 2013
|
Junior Member |
|
|
Hi all,
I have a non database and database block.
while in database block if i make any changes, changes should be saved before moving to non database block.
I wrote the following code in Post-Block trigger but it is not working
IF :SYSTEM.BLOCK_STATUS <>'QUERY' THEN
STD_ERROR_ROUTINE(90250,:GLOBAL.M_LANG_CODE,NULL,NULL,NULL,NULL,NULL,'FP');
END IF;
Can anyone please tell how to solve this situation.
Image is attached.
|
|
|
|
|
|
|
|
|
|
|
Re: Saving problem while moving from database block to non database block [message #604175 is a reply to message #604174] |
Wed, 25 December 2013 08:53 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
I can't try it myself, so you'll have to do that. Create a WHEN-NEW-RECORD-INSTANCE trigger on the control (non-database) block. In it, check database block's status (use GET_BLOCK_PROPERTY). If its status is such that you'd want to save those changes, COMMIT. Otherwise, don't do anything.
yesh
while trying to save POST-BLOCK shouldn't fire if my understanding is correct
If you were on Forms 10g, you could have used its debugger. On Forms 6i, you'll have to do that manually: put a MESSAGE call into every trigger you have (as its very first command). Run the form, do whatever you do. MESSAGE will tell you which triggers are firing. Don't be surprised when POST-BLOCK fires, although you don't expect it to. Numerous triggers fire in respond to your actions, not only the ones you think they should.
|
|
|
|
|
|