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.

Similar Messages

  • 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.

  • 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

  • Removing a message (Do you want to save changes)

    Hi all,
    I have a screen (login), to let the user enter the user name and password then click the button (enter), but when the user clicks enter the message (Do you want to save changes) appear,
    How to remove it??
    Thank you very much
    Tasneem

    hi
    is it db items or non db items?
    clear_form();
    or
    search online for.
    SYSTEM.MESSAGE_LEVEL  built-inThere are 25 Levels of Message in an Oracle Forms.
    How much cretical error or message is
    0 -- all errors or message
    1
    2
    25 -- don't shows any
    If we don't want to show any error or message to the user then we assign 25 to message level as
    :SYSTEM.MESSAGE_LEVEL := 25;Now, system will not show any message error to the user.
    If i wanna show all the errors then assign it 0.
    :SYSTEM.MESSAGE_LEVEL := 0; sarah

  • 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

  • When closing the Form "Do you want to save changes" window

    Hi
    I have a Master-Detail form where in my POST-QUERY trigger i am changing the LOV non-database item field to some value. When I just select Master record(NOT in query mode) my detail records pop up in the detail block. This is done by EXECUTE_QUERY in WHEN-NEW-BLOCK-INSTANCE trigger in Detail Block. But when i close the form it asks me to save changes even though i haven't changed anything. I have this statement in POST-QUERY Trigger
    SET_RECORD_PROPERTY(:SYSTEM.TRIGGER_RECORD,:SYSTEM.TRIGGER_BLOCK,STATUS,QUERY_STATUS); This issue does not happen in QUERY-MODE.
    I tried both Set_Item_Property('BLOCK.CODE',ITEM_IS_VALID,PROPERTY_TRUE); this property in the POST_QUERY and Set_Item_Property('item_name',VALIDATE_FROM_LIST,PROPERTY_TRUE); in QUERY-MASTER-DETAILS trigger but it didn't work.
    please help
    thanks

    Hi!
    I think, beause the message "Do you want to save the changes ..." has no error number,
    you will not get to catch it on a form level on-message-trigger.
    Better find out, why the record status changed.
    - Look to a post-query trigger that fills or changes a database item
    - change the Validate From List item Property to No
    - check for a when-validate-item or post-change trigger on items with a lov that has the Validate From List item Property set to Yes
    Regards

  • Message "Do you want to save changes" to save when user clicks on other tab

    Hi,
    I have a series of tabs embeded from the main template CustomerTemplate.jspx with <af:commandNavigationItem. I have tabs on BasicData, Accounts etc. I have backing bean (including update button for saving the changes in the same) writtend for BasicData.jspx embeded inside CustomerTemplate.jspx, linkewise other tab.
    Now, i am capturing the changes being done in BasicData.jspx in the backing bean. When user shifts to other tab by clicking on the same, i need to popup the message "Do you want to save the changes" Yes/No. If use selects Yes, i need to call Save method from the backing bean else ignore and move to other page.
    I have written the code in CustomerTemplage.jspx for bringing BasicData.jspx pages as following
    <af:commandNavigationItem text="#{res3['cbuca.menu.basicdata']}"
    id="pt_cni2"
    immediate="true"
    selected="#{attrs.mode=='basicdata'}"
    action="basicdata"
    destination="/faces/CustomerBasicData.jspx"
    rendered="#{security.isUserInRole['basicdata,0']}"
    partialSubmit="true"
    attributeChangeListener="#{viewScope.backing_TestPage.openCustomDialog}"/>
    As per the ADF Documentation, attributeChangeListener will be fired once the attributes is changed (like lose focus) and not through programatically to change the attributes. But, it looks like event is not being fired after several test. I have using JDeveloper 11.1.1.0.2. This requirement will be re-usable for saving the changes to other tabs as well.
    If anybody suggest with the help of code to solve the acheive my requirement will be greatly appreciated.
    Thanks in advance.
    Thanks
    -Mahesh

    Hi Hasim,
    Can you please elaborate like whether this code will be done in the Backing Bean or in the form of javascript.
    Can you pl. give a brief on the below one with some more code snipets (if available).
    ((DCIteratorBinding)this.getBindings.get("VOIterator")).getViewObject().getApplicationModule().getTransaction.isDirty();
    Thanks Guys for quick reply and help.
    --Mahesh                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • 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

  • Customizing default message "Do you want to save changes you have made?"

    Hi all
    Can I customize the default message generated by oracle forms "Do you want to save changes you have made?"
    I want to change its title, message, alert style, button labels, and visual attribute. And functionality.
    Thanks
    Asad.

    Of course ON-MESSAGE will not work. Use the trigger on your Exit_Form button. Then check the form or block or record status (depending on your design) and do appropriate coding, something like this:
    IF :System.Form_Status = 'CHANGED' THEN
    retCode := Show_Alert('MY_EXIT_ALERT');
    if retCode = ALERT_BUTTON2 THEN
    Exit_Form(NO_VALIDATE);
    elsif retCode = ALERT_BUTTON1 then
    Commit_Form;
    else
    Whathever_It_Is;
    end if;
    end if;
    If you have master-detail block and u're recieving the message when detail is changed but u want to scroll master records - write me a mail to tell u which trigger to use. It is not that I don't want to share info - just can't recall right now.

  • Do you want to save changes button code

    Hi guys,
    Quick question which I was wondering if anyone could help me out. When a form has changed and you press the x button you get the message do you want to save changes? with a yes or no option. Is it possible to put code in to trigger of these yes/no buttons when clicked and if so how would I go about doing this?
    Thanks.

    hello
    if i got your need so you will need to create alert
    then start coding
    examlpe
    1- create alert called save_record
    2- in key exit trigger write this code
    DECLARE
    al_id Alert;
    al_button NUMBER;
    BEGIN
    al_id := Find_Alert('save1');
    IF Id_Null(al_id) THEN
    Message('User_Warning alert does not exist');
    RAISE Form_Trigger_Failure;
    ELSE
    /* ** Show the warning alert */
    al_button := Show_Alert(al_id);
    ** If user pressed OK (button 1) then bring up another
    ** alert to confirm -- button mappings are specified
    ** in the alert design */
    IF al_button = ALERT_BUTTON1 THEN
    al_id := Find_Alert('Are_You_Sure');
    IF Id_Null(al_id) THEN
    Message('The alert named: Are you sure? does not exist'); Message('The alert named: Are you sure? does not exist');
    commit;
    exit form;
    RAISE Form_Trigger_Failure;
    ELSE
    al_button := Show_Alert(al_id);
    IF al_button = ALERT_BUTTON2 THEN
    null;
    END IF;
    END IF;
    END IF;
    END IF;
    END;
    Edited by: Khaled Farouk on 27-May-2013 07:09

  • Keep Getting 'Do you want to save changes Msg'

    Hi all
    Have a small form, two multi-record blocks, everything works ok, have no commits or anything in it but keep getting the message 'do you want to save changes?' if I clear query or exit form, if I press yes I get frm-40400 X amount of records saved when nothing has been changed.
    I have another very similar form project more or less the same but with only one block and it doesn't do this??
    Any ideas?
    Andrew

    I have used built in exit_form on a key exit form trigger and this has stopped message when I exit form.
    exit_form(no_commit, no_validate);
    But when I clear the query the 'Do you want to save' message still appears and also a message at the bottom left saying:
    Press CTRL + Tab to move between choices, ENTER to select.

  • Query on Custom schema table getting 'Do You want to save changes' message

    Hi all,
    I am getting the error message whenever I query from the custom table. Here is the description of the issue.
    1. I have a button on the first block. When the user clicks on this button , execute_query is called on another block. Then the user getting the message "do you want to save the changes" . Although there are no changes made on the form.
    2. The second block is based on a custom table defined on the custom schema.
    3. Created public synonym for this table and also gave the all the grants to apps schema on this table.
    4. This error was not coming before when the second block is based on Apps schema table.
    Any idea on how to fix this.
    Thanks

    I doubt the problem is related to a schema or public synonym. The message is appearing because the value for an item is being changed after your query executes.
    First check to make sure that the blocks that are not based on a table are set to No. See the Database Data Block Property.
    If that doesn't solve the problem, then run the debugger and watch to see what item is changing. You may be doing something in a trigger.

  • Is it possible to hide/show the "Do you want to save changes you have made?" msg

    Hi,
    Is it possible to hide and show the Oracle message "Do you want to save changes you have made?"
    Thank You

    Not really.
    You have to use commit_form to commit the changes or a
    rollback_form to rollback just before exit_form, clear_form,
    or clear_block.
    Or, use clear_form(no_validate), clear_block(no_validate).
    It might be good to check wether there is some change in the
    data and show an alert in your own language asking the user in
    his/her own language wether he/she wants to commit the changes
    or not.

  • 'Do you want to save changes you have made' while closing the form

    Hi Everyone,
    I am working on Oracle Applications 11.5.10.2 version. I have created a new form as per the client requirement and registered with APPS. I met all the requirements, but when ever closing the form getting the error 'Do you want to save changes you have made' without entering or modifying records in he form.
    Please help in this regard, bit urgent.
    Thanks in Advance..
    Venky.

    Hi,
    You can suppress messages depending on their message level. For a full description and examples on this topic, please see the help in Forms Builder (press F1 in your Builder) and search for :system.message_level.
    or the other way would be.
    As you are using the copy command for moving the data from one block to the other block , the status of the block will be changed to "Modified".As per oracle standards when every the block status is modified it fire the meassage 'Do you want to save changes you have made' .
    To avoid the message you need to change status of each line to "Query" .Once you do this the block status automatically changes to "query" .Once it is in query mode when you try to close the form it will not pop-up the above message.
    To change the line status use POST command . To get help on this command you can use form builder help.
    Hope this serves your purpose.
    Let me know if you need any further clarification.
    Rgds,
    Naveen.

  • LOV Display - "Do you want to save changes?"

    Hello,
    I setup and simple LOV with just a few fields. When the user enters runs the form they can click on a button "View List", then the LOV displays nicely. They can choose a record from the list and it displays just fine in my form.
    The problem is that when they click on the "View List" button again, then chose a differnent record, I keep getting the message "Do you want to save the changes you have made?". Even when you say "NO" it doesn't even bring up the record that I clicked on.
    My "View List" whe-pressed trigger looks like this:
    IF Show_lov('LOV_NEWSLETTER') THEN     
         execute_query;
    END IF;
    Do I need to clear the form or something like that ?
    Please help,
    Bob

    Hi Bob,
    the reason is your execute_query statement in the trigger. The user picks up a value out of the LOV, the record get marked for insert/update inside forms. The next time the user picks up a value, forms have to ask for saving the changes because you wan't to progress a execute_query against the same table again. Why do you use execute_query after showing the LOV ?
    Hans

Maybe you are looking for

  • Safari 6.0.2 problems with Yahoo Mail Classic "Compose"

    Since upgrading to Mountain Lion I have had two problems using Yahoo Mail "Classic" in Safari 6.0.2 (8536.26.17).  First when composing a new message, the Formatting Toolbar is missing. Second, contacts do not appear as I type in the To:/Cc:/Bcc: add

  • PHP email form - issue with who it's from

    Hi, I've got a referral page on my site where the user puts in their details and a friends details and the form fires off a email to the friend. The form is in HTML and posts it to a PHP file. The problem is I get in the email for who it's from: from

  • Change Spot Color to CMYK?

    Is there a way in 8.1.4 Professional to change a spot color to another color space? I know colors can be convert in Print Production > Convert Colors but what I'm trying to do is change colors in a PDF from 0AA0 ( 100 magenta, 100 yellow) to 0A50 (10

  • Adding javascript to Print Form button

    Using the Script Editor, can I convert this javascript so that it will fire on MouseUp on the Print Form button? The Designer file is attached for reference. newDocName = ""; f1 = this.getField("topmostSubform[0].Page1[0].Last_Name[0]").valueAsString

  • I know this may seem dumb but like so many others before me I can't find the photos tab in itunes

    Need help finding the photos tab to sync up my iPad and PC