Do you want to save changes after execute query by example

Hi, I kinda hope this is simple to solve.
I have a block with some database fields and some non-database fields.
The none database fields i populate in post-query trigger. However, if I execute the query, it seems that the form thinks that the form id 'dirty', and therefore asks if I want to save changes.
I only want this question if I manually added/changed/deleted something.
Can someone tell me what I should do? Maybe some additional code in the POST-QUERY trigger...
Here's what I've coded so far:
  begin
    select USERNAME
    into :SEC_ACTIVITY_MEMBERSHIP.USER_DISP
    from ISMS_SEC_USERS_LOV_V
    where ID = :SEC_ACTIVITY_MEMBERSHIP.USER_ID;
  exception
  when no_data_found then
    fnd_message.set_name('ISMS', 'SQL_NO_DATA_FOUND');
    fnd_message.set_token('TABLE', 'SEC_ACTIVITY_MEMBERSHIP');
    fnd_message.set_token('COLUMN', '(USER_ID)');
    fnd_message.set_token('VALUE',
     '('||to_char(:SEC_ACTIVITY_MEMBERSHIP.USER_ID)||')');
    fnd_message.error;
  end;
  begin
    select NAME
    into :SEC_ACTIVITY_MEMBERSHIP.ACTIVITY_DISP
    from ISMS_SEC_ACTIVITY_LOV_V
    where ID = :SEC_ACTIVITY_MEMBERSHIP.ACTIVITY_ID;
  exception
  when no_data_found then
    fnd_message.set_name('ISMS', 'SQL_NO_DATA_FOUND');
    fnd_message.set_token('TABLE', 'SEC_ACTIVITY_MEMBERSHIP');
    fnd_message.set_token('COLUMN', '(ACTIVITY_ID)');
    fnd_message.set_token('VALUE',
     '('||to_char(:SEC_ACTIVITY_MEMBERSHIP.ACTIVITY_ID)||')');
    fnd_message.error;
  end;

Check out this thread:
status=Changed
You probably have something in the validation triggers in those fields which change database fields.
To fix it, reset the record status to Query.

Similar Messages

  • Catching: Do you want to save changes? yes,no,cancel

    I would like to capture the update event after "yes" is clicked on the pop up message: "Do you want to save changes? yes no cancel" The form id on this object is zero, and I'm having trouble differentiating between this and similar inventory warnings that pop up as the form id is also zero.

    Hi Jw,
    I would assume that this is when you are using some of the standard business one forms because if it was a request via code you would have full control over it.
    What I like to do is use a before_action and action_sucsess. If the user clicks on cancel, the action_sucsess = False, thus you know your code will only execute when you click ok, unless there were any other errors within SBO, (EG Item not on hand in case of a stock transfer or something) - In which event, you probably dont want your code to excute anyway
    I attach some code below
    Shared Sub ClickEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef bubbleevent As Boolean)
            Dim errfree As Boolean
            errfree = True
            Dim Errmsg As String
            Try
                If pVal.ItemUID = "1" Then
                    If pVal.Before_Action = True Then
                        BeforeAction(FormUID, pVal, bubbleevent)
                    End If
                    If pVal.ActionSuccess = True Then
                        ' Ok so its an After Action
                        If pVal.ActionSuccess = True Then
                            AfterAction(FormUID, pVal, bubbleevent)
                        End If
                    End If
                End If
            Catch ex As Exception
                errfree = False
                Errmsg = ex.Message
            Finally
    Thanks

  • Getting Do you want to save changes while pressing F11

    Hello,
    I created one Custom Form by using template.fmb. In that 2 database blocks and 2 control blocks. In database blocks also couple of items are non database items. When ever I open the form from Oracle Applications and pressing F11 with out doing any changes then it is prompting for Do you want to save changes? If i am pressing Yes then (in my form i am using sequence). that one is generating and saving. After saving it is going into enter query mode.
    Can you please help me out how to avoid this message and why this message is coming.
    Regards,
    Akash Vandan

    You are getting this problem because you are probably modifying one of the fields in PRE or WHEN-NEW triggers. Just check if you have assigned any value to the fields using. you can search for colon (:).
    Just delete that part of code and your form will work fine.
    Regards,
    Ashish Kanak

  • Getting: Do you want to save changes? When there are no changes?

    Forms [32 Bit] Version 10.1.2.3.0 (Production)
    Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
    I have a form that always prompts me if I want to save changes after querying a record and then exiting or trying a new query. I cannot figure out what changes it is asking if I want to save as nothing has been changed on the form. Is there a way to track what is causing this or where it is coming from?

    Are the "Non-Database" items part of a base table block? If so, when you assign a value to these items - even though they are non-database items - Forms will record that the something in >the block has changed. Hi Craig, thats not true. You can change non-db-items in a base-table-block without the record-status beeing changed. Changeing the record-status only happens when the property "Lock record" is set to true, or if there is a WHEN-VALIDATE-ITEM-trigger on the non-db-item which changes a db-item.
    You should always have put non-base table items in a Control Block.Thats also not true. You have non-base-table-items in nearly every basetable-block, think of all the lookup-items. How would you synchronize records in your db-block and your control-block?

  • Do you want to save changes you have made

    hi guys,,
    I need ur help
    I ve a form which retrieve employee data,,
    there are 8 blocks in the form,,
    i created a when mouse click trigger to show a LOV
    declare
    a boolean;
    begin
    a:=show_lov('TEST');
    pc_execute; -- calling a procedure
    END;
    but it gives Do you want to save changes you have made?
    and I tried to suppress this by setting system message level = 25
    but no benifit,,
    And if I write :
    declare
    a boolean;
    begin
    a:=show_lov('TEST');
    GO_BLOCK('ORG_EMP_INCREMENT_HISTORY');
    pc_execute; -- calling a procedure
    END;
    the message will disappear but the query will not execute all blocks
    ANY suggestions
    Best Regards

    Al-Salmau Alikum We Rahamatu Allah We Barakatu...
    if u wanna getting ur total records of emp block then do this as an example ...
    FUNCTION query_count (p_block_name VARCHAR2) RETURN NUMBER
    IS
      cnt NUMBER;
    BEGIN
      GO_BLOCK(p_block_name);
      COUNT_QUERY;
      cnt := GET_BLOCK_PROPERTY(p_block_name, QUERY_HITS);
      IF FORM_SUCCESS THEN
        RETURN (cnt);
      ELSE
        MESSAGE('Error in getting Query Hits for block '||:SYSTEM.CURRENT_BLOCK);
        RAISE FORM_TRIGGER_FAILURE;
      END IF;
    END;and notice the result in the status bar...
    But if u wanna have data it's another issue...
    so u have to do for example...
    IF NOT Id_Null(blk_id) THEN 
        Set_Block_Property('block_name',DEFAULT_WHERE,'emp_id = ' || emp_id);  
       Execute_query;  
       ELSE       Message('You have a problem!');     
    RAISE Form_Trigger_Failure;  
    END IF; Hope this helps...
    Regards,
    Abdetu..

  • Do you want to save changes - appears twice in master-detail form.

    Hello.
    Sometimes ago i wanted "Do you want to save changes" message in my own language.
    So i created trigger:
    if :system.form_status IN ('CHANGED') then
         alert_response := show_alert('CHANGES');
         if alert_response = alert_button1 then
              commit_form;
         elsif alert_response = alert_button2 then
              clear_block(no_commit);
         elsif alert_response = alert_button3 then
              raise form_trigger_failure;
         end if;
    end if;
    I call that trigger in many other triggers like enter_query, ...
    Everything worked fine until i created form with master_detail block.
    The problem:
    I have a form with two blocks. One master, one detail.
    If i change something in detail block, go to master block item and press enter_query problem appears.
    First i get the message "Do you ..." in my language. When i press NO or CANCEL i get again the message "Do you ..." in original (english) language?
    Why is that?
    Should i call my trigger somewhere else and not just in enter_query trigger (for this problem) or is checking form_status not enough?
    Thanks.

    When you create relation, 3 procedures are automatically created for you.
    Check_Package_Failure, Clear_All_Master_Details and Query_Master_Details.
    When you execute clear_block(no_commit) on the master block -
    Clear_All_Master_Details will fire.
    If you check Clear_All_Master_Details you will find following code there:
    Go_Block(curblk);
    Check_Package_Failure;
    Clear_Block(ASK_COMMIT); -- This statement causing "Do you want to save changes" to appear

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

  • How do I stop pop up that asks me, Do you want to save changes to doc... before closing? I have made no changes only printed the file. Using Adobe Reader DC, Windows 7 64 bit.

    How do I stop pop up that asks me, Do you want to save changes to doc... before closing? I have made no changes only printed the file. Using Adobe Reader DC, Windows 7 64 bit.
    This is very annoying and we need this stopped as we have made no changes to any of the adobe files. Please advise how to do this.
    Customer Service DCC

    I first tried the version without the deflated stream (so everything uncompressed) against the online repair tool to check/analyse it @ https://www.pdf-tools.com/osa/repair.aspx
    And it says no error found, but the reader still want to save it when closing so i still had no clue at this point.
    Fortunately, i finally found what was wrong with my generated PDF.
    In my xref table, each object reference was not end by a full EOL, i only did put a newline char.
    Now i have "carriage return" "newline" which is the full EOL and the reader is happy and close the file silently.
    As suspected i did not follow correctly the specs on xref table
    Now i'll go and figure what i did wrong with the deflate filter
    Thanks for your help.

  • Adobe Reader X (free) -- "Do you want to save changes" prompt

    Why is this prompt always coming up when I close a PDF document?
    "Do you want to Save Changes to  X   Before closing?"
    I am using the free Adobe Reader X 10.1.1.  I can't make any changes to the file since it's the free version, so why is it asking me to save changes?  Even if I just open the file and just close it right away without doing anything else the prompt comes up.

    I think pretty much any PDF created by CutePDFWriter did that (as well as others not created that way, but CutePDF seemed to do it reliably).
    To verify that I'd have to un-install 9.5.0 and re-install Reader X, which I'd rather not do (9.5.0 is better in other ways too - the integration with Chrome is nicer because the "print" and "save as" buttons always appear; they hardly ever appeared in Reader X when opening a PDF from Chrome).
    You can get CutePDFWriter here: http://www.cutepdf.com/products/cutepdf/writer.asp
    Let me know if you can't reproduce the problem (just post here) and I'll un-install/re-install, verify a file with the problem, and post it.
    For now I'm very happy with Reader 9.5.0; it's perfect.

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

  • How to disable 'do you want to save changes to...'

    Is it possible to disable the 'do you want to save changes to...' pop-up in Reader 10.1.1 LS? I'm using CrystalViewer to read reports - but I don't edit them so don't need to save any changes.

    Make sure that the PDF files are not corrupted. Otherwise Adobe Reader repairs the files and will save the changes.

  • Master-detail raises Do you want to save changes

    Dear all,
    my form is of 1 master block and 3 details to that block, now whenever i tried to exit the form a Do you want to save changes? message is displayed but whenever i delete any one of the relations the message doesn't appear..
    plz any help is appreciated

    The problem is that some of the records are marjed as dirty - If you're not actually changing anything manually and you still get the error, then check that you've not got any POST-QUERY triggers updating DB fields or the use of LOV for validation which can also mark a record as dirty.
    You can of course supress / ignore the DYWTC message using EXIT_FORM(NO_VALIDATE) or similar, but you'lll probaly want to double check the cause of the record update first.

  • 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

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

Maybe you are looking for

  • Can't set the printer (print option not working) in Photoshop CC for Mac (Yosemite)

    I can print from all other apps but a couple of days ago Photoshop just stopped being able to print to my HP Color Laserjet. Photoshop either gives me an error message: will not print until a printer has been set OR it just crashes. I have de-install

  • Patchset installation haning on"loading product information"(WIN, 10.2.0.4)

    Hi there, I'm facing problem with patchset 10.2.0.4. It appears that installation is haning with information "Loading product information". I've checked installation log files and nothing interesting seems to be there. RDBMS is running on windows ser

  • New OS has locked up my playbook

    I just downloaded the new OS 2.0 and my playbook has locked up on reboot. When it finally starts up I get the home screen but nothing works. When I manage to get into the OS hardware settings I see that I only have only 29.5 mb of memory available of

  • OnRollOver sound in a movie clip object

    Scenario: I have a  frame with a quiz question and three answer options. The three answer options are movie clips. Their instance names are q1_soundA, q1_soundB, and q1_soundC. I want each option to make a different sound when rolling over them. My s

  • Hyperlinks stopped linking

    Hi Everyone I have a collection of reports that that are supposed to allow drill down into each other. The problem is that (for various reasons) I can't use data models here. So I have a set of queries each describing one face of the hypercube I woul