This discussion is archived
4 Replies Latest reply: Jan 8, 2013 11:21 PM by user346369 RSS

how to suppress message level on FRM-40405 ?

user2040934 Newbie
Currently Being Moderated
Dear members,

I want to hide "FRM-40405 No changes to apply". used the following
:system.message_level := 25;
commit;
:system.message_level := 5;
but still the same message, where am I wrong?

regards:
  • 1. Re: how to suppress message level on FRM-40405 ?
    HamidHelal Guru
    Currently Being Moderated
    Create a Pre-Form trigger at form level and write down the following code
    :SYSTEM.MESSAGE_LEVEL := 5;
    Hope this works..

    Hamid
  • 2. Re: how to suppress message level on FRM-40405 ?
    CraigB Guru
    Currently Being Moderated
    Rather than supress the message, I recommend you find where you are attempting to save (Commit_Form) when it is not needed. I see this over and over where developers just call COMMIT_FORM rather than check to see if there are changes to commit. Forms provides the following system variables that you can check to see if you need to issue a commit_form. They are, :SYSTEM.FORM_STATUS, :SYSTEM.BLOCK_STATUS and :SYSTEM.RECORD_STATUS. The values for these variables are: CHANGED, NEW and QUERY. Additionally, the RECORD_STATUS also has the INSERT value as well. To find out what these values mean, look up these system variables in the Forms Help system.

    Craig...
  • 3. Re: how to suppress message level on FRM-40405 ?
    user2040934 Newbie
    Currently Being Moderated
    thanks for your reply,

    here is the complete scenario,

    I have a form "FORM1" from which, I am opening another form "FORM2". using the following code.
         OPEN_FORM('FORM2.FMX', ACTIVATE, NO_SESSION, LIST_ID);
    when I open the FORM2 and update a field and press exit button it alter " do you want to save changes" on pressing 'Yes" it 2nd time show alter "FRM-40405 no changes to apply".

    I want to suppress this alert.

    when using open_form with SESSION it don't give any alert.

    here I am confused that the alert is coming from where? from FROM1 or FORM2?

    I tried all the possible techniques to suppress this alert but couldn't be able to suppress.

    Regards:
  • 4. Re: how to suppress message level on FRM-40405 ?
    user346369 Expert
    Currently Being Moderated
    Sounds like it is coming from Form1.

    Write some code in the On-Error trigger in Form1 to suppress the 40405 message.
    A variation of the code Re: forms messages (field must be entered) should work.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points