Home » Developer & Programmer » Forms » how to avoid message 'Do you want the changes you have made"'
how to avoid message 'Do you want the changes you have made"' [message #154143] Thu, 05 January 2006 22:06 Go to next message
manyal
Messages: 84
Registered: March 2005
Member
Dear Friends

In my form sometimes when i switch from detail block to master block one message is poped up saying 'Do you want to save changes you have made'.
then i have to click 'Yes' to save changes.
I want to customise my form in such a way so that there is no need to click on 'Yes' instead it shud save the changes automatically.

waiting for an early response.

thanx in advance.

Manyal

Re: how to avoid message 'Do you want the changes you have made"' [message #154144 is a reply to message #154143] Thu, 05 January 2006 22:16 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
In a pre-block trigger of the master block use get_block_property('dtl_blk',status) and if it is 'NEW' or 'CHANGED' then do a commit_form.

Have a look at the sample code associated with Commit_Form in the reference manual.

David
Re: how to avoid message 'Do you want the changes you have made"' [message #154219 is a reply to message #154144] Fri, 06 January 2006 04:55 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
The only drawback of this approach would be FRM-40737: Illegal restricted procedure COMMIT in PRE-BLOCK trigger Smile

Not a big deal - move logic into a trigger that allows restricted procedures (for example, WHEN-NEW-BLOCK-INSTANCE).
Re: how to avoid message 'Do you want the changes you have made"' [message #154460 is a reply to message #154219] Sun, 08 January 2006 17:39 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I thought I checked the documentation on Pre-Block and was surprised that it had restricted okay, where Post-Block did not. I must have read the wrong entry.

I seem to remember that there is another trigger that is 'closer' to the detail block in which to do this work.

David
Previous Topic: Explain --- Standart commit
Next Topic: UNABLE TO READ IMAGES (1.50 MB) FROM FORMS
Goto Forum:
  


Current Time: Fri Sep 20 04:47:47 CDT 2024