4 Replies Latest reply: Jan 22, 2013 2:04 AM by ck RSS

    enter key

    914232
      hi sir

      i have a master-detail form.before filling up all the item in master cursor
      should not go to details,if user clicks in detail he should get a message.

      when i am pressing ENTER to navigate from one item to another is asking
      'do u want to save the changes'.how to control this message and when pressed
      enter cursor should go to next item.please provide solution for this.

      thanks in advance.
      regards
        • 1. Re: enter key
          yoonas
          Hi,

          Please see https://blogs.oracle.com/shay/entry/10_commandments_for_the_otn_fo

          1.
          >
          before filling up all the item in master cursor should not go to details,if user clicks in detail he should get a message.
          >
          In detail block When-New-Block-Instance check if all fields are filled in if not give user your message and go back to the master block
          When-New-Block-instance
          
          if master.item1 is null then
          message('Please fill the header level.............');
          go_block('master');
          end if;
          2.
          >
          when pressed enter cursor should go to next item
          >
          For Enter Key
          in KEY-NEXT-ITEM trigger
          --do your  code
          next_item;
          3.
          >
          'do u want to save the changes'.how to control this message
          >
          You can save the record you modified before you go to next record to avoid the 'do u want to save the changes'


          Regards
          Yoonas
          • 2. Re: enter key
            vansul
            in when new from instance trigger write
            :system.message_level:=25;


            then that will not ask do you want to save the changes.
            • 3. Re: enter key
              Andreas Weiden
              Not a good idea. It will simply hide all messages and errors.
              • 4. Re: enter key
                ck
                Modify the relations properties

                FUNCTIONAL

                set Prevent Masterless Operations to YES.