How to override the dialog "Do you want to save" while closing the form?

HI
I have two blocks on the form.Master block is based on a view wheres the detail block is populated by a procedure.
Even if the user doesnot change any record and trying to close the form it is still showing the default "Do you want to save" with three options save,discard,cancel as choices.How can we prevent the form displaying that if the user is closing the form with out any uncommited changes.
Thanks in advance.

Read this thread about the affects of post-query and when-validate triggers:
    Message Do you want to change the changes you have made? caused by a lov

Similar Messages

  • How to enforce the message "Do you want to save changes?"

    Hello,
    How to enforce the message "Do you want to save changes?" when the user attempts to close a form after checking a non-database item (check-box).
    All the other database items in the block are not updateable and only viewable.
    After checking the non database item check-box, if the user tries to commit, then the system is saving the changes and call the appropriate procedure on save.
    But if the user tries to close the window without committing, the form is not showing the message "Do you want to save changes?" since the check-box is a non database item.
    How to enforce the message "Do you want to save changes?" in this scenario when the user tries to close the window?
    Thanks in advance.
    Cheers
    Sri

    This is a fairly common question in the forum. You will need to override the default exit form process and check to see if the checkbox is checked. You can do this in the Key-Exit trigger. For Example:
    DECLARE
      al_id     ALERT;
      al_button  NUMBER;
    BEGIN
      IF ( CHECKBOX_CHECKED('YOUR_BLOCK.CHECKBOX_ITEM') ) THEN
         /* Display an Alert here that asks, "Do you want to save changes?" */
         ...code here to set the properties of your alert...
         al_button := Show_Alert(al_id);
         IF ( al_button = ALERT_BUTTON1 ) THEN
            --YES
            /* Perform COMMIT Processing here...*/
         ELSIF ( al_button = ALERT_BUTTON2 ) THEN
            --No
            Exit_Form(NO_VALIDATE);
         ELSE
            --Cancel
            RAISE Form_Trigger_Failure;
         END IF;
      ELSE
         Exit_Form;
      END IF;
    END;If you need more help with the Alert, please check out the SHOW_ALERT topic in the Forms Help.
    BTW, what happens if all the user does is check the checkbox? No other changes have occured. What changes are you trying to process?
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • How to remove the warning "do you want to save changes to investigation.pdf before closing"

    Issue: To remove the warning "do you want to save changes to investigation.pdf before closing"
    I have created a XFA pdf file(using LC Designer 8.2) to display this issue
    I am not able to attached the PDF. Without attaching the pdf it would be difficult to explain.
    click event js:
    function activateUser() {
      var PDFVersion=xfa.host.variation+xfa.host.version;
      xfa.host.messageBox("button click event registered");
      xfa.form.form1.sendForm.welcomeMsg.presence = "invisible";
      xfa.form.form1.sendForm.successMsg.presence = "visible";
      event.target.dirty=false;
    docReady event js:
    function displayInfo(){
    var res =xfa.host.variation;//Added this line to display the successMsg
    //xfa.host.messageBox("docReady event registered");
    xfa.form.form1.sendForm.welcomeMsg.presence = "visible";
    xfa.form.form1.sendForm.successMsg.presence = "invisible";
    docClose event js:
    xfa.host.messageBox("docClose event registered");
    event.target.dirty=false; 
    Steps to get the warning:
    1) Open the attached pdf using Acrobat Professional.
    2) Click the Confirm Enrollment" button
    3) Now close the document & the acrobat gives a warning "do you want to save changes to investigation.pdf before closing"
    Summary of the XFA pdf:
    It has two text fileds. On docReady event field A is made visisble & field B is made invisible.
    On button click event the field A is made invisisble & field B is made visible.
    On closing the pdf it should not throw this warning message.
    My Efforts:
    1) Found a property in adobe js docs.
           event.target.dirty=false;
    It doesn't solve the problem.
    2) I tried to put this logic in almost all the events listed in designer but I am not able to resolve the issue.
    Please help me resolve this issue.

    I tried putting the below 2 lines of code at the end of button click event & docClose event.
          event.target.dirty=false;
          event.target.requiresFullSave=false;
    It still gives the warning.
    Also I tried to found out the line of code which is making the pdf dirty.
      xfa.host.messageBox("is doc dirty (before displayInfo's visible-invisible work): " + event.target.dirty);
      xfa.form.form1.sendForm.welcomeMsg.presence = "visible";
      xfa.form.form1.sendForm.successMsg.presence = "invisible";
      xfa.host.messageBox("is doc dirty (after displayInfo's visible-invisible work): " + event.target.dirty);
    The doc got dirty when the successMsg field is made invisible.
    Problem I am trying to solve is:
         To display a welcome message before user action and after user action wants to display a success message.
         I follwed the visible & invisible approach & it wokred but gives me a warning on doc close.(Highly imp to avoid it)
    Is there any other approach I could follow here.

  • Suppress the message do you want to save the changes you have made

    hi all
    i have written a rollback
    it clears my record
    but gives me the message
    do you want to save the changes you have made
    i have written
    :system.message_level :=25;
    rollback;
    :system.message_level=0;
    but still it is giveing me the message
    can you please tell me how to suppress this message
    please help me
    thanks
    mandar

    try in reverse

  • Show the alert 'Do you want to save the changes? after entering each record

    Hi,
    Is there a way to show the alert 'Do you want to save the changes you have made?', after entering each record.
    i.e. as soon as a record is entered, user should be prompted to 'Do you want to save the changes?' the record when they move to the next record.
    I used the below code in Post-Record rigger. Prompt was diplaying fine as per the requirement,but record was not being saved.
    DECLARE
    n_button_selection INTEGER;
    BEGIN
    if :System.Record_Status='INSERT' then
    fnd_message.set_string('Do you want to save the changes?');
    n_button_selection := fnd_message.question('Yes', 'No','Cancel', 1, 2,'question');
    IF n_button_selection = 1 THEN
    forms_ddl('commit_FORM');
    ELSIF n_button_selection = 2 THEN
    RAISE form_trigger_failure;
    ELSE
    NULL;
    END IF;
    end if;
    END;
    I used forms_ddl('commit_FORM') to commit the record. Because we can't us Do-key('commit_form') in post-record trigger. But forms_ddl('commit_FORM') is not working. So can anybody please give some idea regarding this.
    --

    Forms_ddl issues dynamic sql - you cannot call another builtin (like commit_form) within forms_ddl. Check form_status after the call and you will see that it failed.
    Moreover, forms is not able to execute the post and commit process if you issue "forms_ddl('commit');", so this will not be a solution either.
    You could use the When-New-Record-Instance - Trigger, which allows restricted built-ins to be executed, and issue do_key('commit_form');". However, you would have to check the :system.block_status or :system.form_status, because :system.record_status will already hold the new record number.
    Regards,
    Gerd

  • Supress Prompt 'do you want to save changes to the design of form...

    Using Access 2007 SP2.
    I have an unbound main form(Master page) with a datasheet subform in an mdb.
    Close button is on the main form with the following code 
    DoCmd.Close acForm, Me.Name, acSaveNo
    I have tried with multiple scenarios but none of them got succeed(Below are those)
    set SourceObject property to "" while Unload
    SetWarnings  False in Form_load
    When I close the form I am prompted with  'do you want to save changes to the design of form...'
    Is there any way to suppress this annoying message?
    Can anyone help on this
    Thanks in advance

    When I close the form I am prompted with  'do you want to save changes to the design of form...'
    Which form is it prompting you about saving, the main form or the subform?  If you close the main form with "DoCmd.Close acForm, Me.Name, acSaveNo", I wouldn't expect you to get a prompt about saving changes to that form.  But I could
    see you getting a prompt about saving design changes to the subform.  Are you making any design changes to the subform while in form view, such as filtering, sorting, column-resizing, etc?
    Dirk Goldgar, MS Access MVP
    Access tips: www.datagnostics.com/tips.html

  • How to avoid the message "Do you want to save the changes you have made?"

    i have 3 forms
    master block
    detail1 block of master
    detail2 block of detail1
    when i go out of detail1 and detail2 blocks after doing some modifications it asks me "Do you want to save the changes you have made"?
    i want to avoid this message as well as my changes should be posted in the database. what is the solution for this big pblm?

    hi
    may be you are trying to modify the database item or reassigning the database item value which is not actually needed.
    try to comment the reassigning database values
    and give clear_form(do_commit);
    most probably u will not get the message again
    Regards
    Rajdeep .A

  • Is Is the option: "Do you want to save this session?" gone? I can't find it anywhere in options.

    When one closes the Firefox browser in 3.xx versions, if the "warn me about closing multiple tabs" button is enabled, option listed as the following question: "Do want to save this session?" would be given as "yes" or "no". This provided the convenience of opening the browser with all the original tabs from the last session: a VERY usable option. It is nowhere to be found with 4.xx versions. If it was removed please re-install with the next upgrade release. If its still available, tell me how to enable it. Reese

    Firefox now always stores the old session, and you can access it by going to the History menu and selecting "Restore Previous Session"
    If you want Firefox to display the message to save the session, it can be turned back on by changing some preferences.
    # Type '''about:config''' into the location bar and press enter
    # Accept the warning message that appears, you will be taken to a list of preferences
    # Locate the preference '''browser.tabs.warnOnClose''', if its value is set to '''false''', double-click on it to change its value to '''true'''
    # Repeat this for these 3 preferences '''browser.warnOnQuit''', '''browser.warnOnRestart''' and '''browser.showQuitWarning'''
    If you always open the last set of tabs, an alternative approach is this:
    # Click the orange Firefox button, then select options to open the options window
    # Go to the General panel
    # Change the setting "When Firefox starts" to "Show my windows and tabs from last time"

  • Disable the prompt "Do you want to save the chnages you have made?"

    Hi,
    I have a forms application with some text fields on it.
    After the data is displyed on the text fields from the
    database, one of the text fields gets highlighted
    automatically, even though I have not selected it
    manually.
    When I close the forms window, I get the
    message prompt "Do you want to save the changes
    you just made?",though nothing was changed in the
    text fields.
    Can anyone help me get rid of these implicit forms messages?.
    Thanks
    sharath

    Hi
    After the data is displyed on the text fields from the database
    Are you displaying data through querying the base table through execute_query (or similar built-ins) or are you populating the block programatically?
    In case you are querying the record, then form should not display save confirmation dialog box.
    If you are populating the data block programatically and if the block is a database block then try including this as the last statement of your populating logic: -
    set_record_property(:system.cursor_record,<block_name>,status,query_status);
    Regds
    Sumit

  • Deactivate question "Do you want to save" when closing

    Very good in Lion: when switching off the computer all programs close immediately. But Logic: always this stupid question "Do you want to save?". How could I get rid of this question, deactivate it in order to get the program closing immediately.

    imho very bad in Lion, that.
    I can no longer Save as... in Preview, so I can now only rename my screenshots (what I always did after editing them) via the Finder. Also, this Lion automatic save nonsens makes the Mac take much longer to start up than it did under Snow Leopard.
    Also, if I open a Logic project, fool around in it, decide that I don't want to keep any of my foolings, luckily I still get the option to close and NOT save. For that reason it is very good that the user still has a choice of saving or not in Logic.
    Afaik you cannot deactivate the "stupid question".

  • I closed my session without saving. Previously for the same tabs I had pressed save while closing. I didn't restore old session while opening firefox again. Is there any way I can get my previous session back???

    happened on windows laptop

    Firefox 4 saves the previous session automatically, so there is no need for asking if you want to save the current session.
    You can use "Firefox > History > Restore Previous Session" to get the previous session.<br />
    There is also a "Restore Previous Session" button on the default <b>about:home</b> Home page.
    You can set the warn prefs on the <b>about:config</b> page to <b>true</b> via the right-click context menu or toggle the value with a double left-click.
    * browser.showQuitWarning, see http://blog.zpao.com/post/3174360617/about-that-quit-dialog
    * browser.tabs.warnOnClose, see http://kb.mozillazine.org/About%3Aconfig_entries
    * browser.warnOnQuit , see http://kb.mozillazine.org/browser.warnOnQuit
    * browser.warnOnRestart , see http://kb.mozillazine.org/browser.warnOnRestart
    To open the <i>about:config</i> page, type <b>about:config</b> in the location (address) bar and press the "<i>Enter</i>" key, just like you type the url of a website to open a website.<br />
    If you see a warning then you can confirm that you want to access that page.<br />

  • HOW to call at anytime the form6 "do you want to save the changes you have made"????

    HOW to call at anytime in form6 "do you want to change the save you have made"????
    It executes only if you use exit_forms
    and I don t want to save with a commit_forms
    without do appears this forms of form6
    Thanks a lots for any answering
    null

    you have to write a trigger on key-clrfrm and key-next-record.
    on that triggers you can call alert with 2 or 3 buttons.
    I hope it will help.
    Mustafa

  • How do you specify the folder that you want to save a download to? I only see the options for recent places or favourites? How do you drill down?

    how do drill down into the folders when downloading? I only get the option of recent places and favourites?

    Using Safari ??
    From your Safari menu bar click Safari > Preferences then select the General tab.
    Click the:  Save downloaded files to pop up menu then click Downloads or click Other then navigate to the folder you want to use to save downloaded files to.

  • Not to Save While closing the form

    Hai To all,
                I have created a screen using UDO. My problem is while saving iam validating the fields. When i clos the form using close button(x) at the right top of the form it ask for whether to save the form or not? If i give yes if there is no data also it is saving automatically. For me it should not. It must ask for save if i give yes it should not save.
    If anyone have idea reply me...........
    Thanks,
    Regards,
    Anitha

    Hi..
            Check ur UDO or once Update UDO...
    Thanks...
    Chiyan

  • I am working in photshop elements 13 organizer, album view, and would like to resequence (rearrange) the photos shown in the album but am unable to do so.  My understanding is that you can click on the phots that you want to move and drag it to a new loca

    I am working in photshop elements 13 organizer, album view, and would like to resequence (rearrange) the photos shown in the album but am unable to do so.  My understanding is that you can click on the phots that you want to move and drag it to a new location within the same album.  After i select the photo that I want to move and click on the photo, I get a cirlcle with a diagonal throught it and am unable to drag the photo to its new location.  What am I doing wrong?  I know this should be a simple thing to do.  Thanks

    Jimmy RG
    In the Elements Organizer 13
    The key to all this is to click on/select/highlight the Album that you have created in Local Albums.
    Then make sure that the Sort By: (in the row below the highlighted "Media" header is set for Album Order.
    You should see a number at the top left of each of thumbnails.
    Then, click on the thumbnail that you want to move, hold down the click, and drag the thumbnail to the wanted new location
    in the line up of thumbnails.
    Often I had to press down hard on the drag.
    Please let us know if that worked for you.
    Also, in Edit Menu/Preferences/Keyword Tags and Albums/Enable Manual Sorting Options, I set all for manual.
    ATR

Maybe you are looking for