4 Replies Latest reply on Aug 18, 2008 9:08 AM by 622131

    FRM -41039: Invalid alert ID 0

    622131
      Hello everybuddy
      i am trying to run this form .It is ok with the compilation but in the run time ,it is giving an error which is "FRM 41039 :Invalid Alert ID 0".The control is entering into the first if block (if mrcdcnt <> 0 then) . I am getting this error twice back to back.

      Declare
           chk_button number;
           mrcdcnt number;
           IO_ALERT ALERT :=Find_Alert('generic_alert');
           BUSS_ALERT ALERT := Find_Alert('generic_alert');
      Begin
           mrcdcnt:=0;
           select count(*) into      mrcdcnt from suplr_mstr where suplr_mstr.suplrid=:BLKSUPLRMSTR.TXTSUPLRID;
           -- message(mrcdcnt);
           
           if mrcdcnt <> 0 then
                message('Enter Suppliers unique identity number');     
                set_alert_property('IO_ALERT',title,'Primery Key Violation');
                set_alert_property('IO_ALART',Alert_message_text,'Supplier`s ID number already exists');
                chk_button := show_alert('IO_ALERT');
                RAISE FORM_TRIGGER_FAILURE;
           end if;
           
           if not:BLKSUPLRMSTR.TXTSUPLRID > 0 then
           message(:BLKSUPLRMSTR.TXTSUPLRID);     
           message('Enter supplier`s identity number.');
           set_alert_property('BUSS_ALERT',title,'Business rule violation');
           set_alert_property('BUSS_ALERT',alert_message_text,'Supplier`s ID number should be a possitive integer');
           chk_button:=show_alert('BUSS_ALERT');
           RAISE FORM_TRIGGER_FAILURE;
           end if;
           END;
                
      Can any one please help me.
        • 1. Re: FRM -41039: Invalid alert ID 0
          CraigB
          Typically, this error is caused when you attempt to display an Alert that does not exist. Have you checked the Forms Navigator to see if the Alert you are trying to display is listed in the Alert Node?

          Craig...
          • 2. Re: FRM -41039: Invalid alert ID 0
            622131
            Hi creg
            i have found the set_alert_property from the alert node(ctrl+h).But still it is giving error.
            • 3. Re: FRM -41039: Invalid alert ID 0
              CraigB
              Hello,
              SET_ALERT_PROPERTY() is a Forms Built-In. Simply calling this built-in without creating the corresponding Alert in the Alerts node of the Navigator will cause this error. When I refer to the Navigator, I'm referring to the "Tree" that displays the different objects that make up your form. With your form open, find the "Alerts" node right below "Triggers" and above "Attached Libraries". Alerts are not created by default in a form when you create a form. Therefore, you must create your own before you can display information to a user with an Alert Box. Simply click on the Alerts node and then click on the Plus ( + ) in the toolbar to the left. Once you have an Alert created you will want to define the properties of the Alert; such as the Title, Alert Style, Button Names, etc., with the Property Palette.

              The fact that your call to Find_Alert() is returning 0 (zero) tells me that you either don't have an Alert called "generic_alert" or you have misspelled the Alert name.

              Hope this helps.
              Craig...
              • 4. Re: FRM -41039: Invalid alert ID 0
                622131
                Thanks craig,at last it worked .Thank you very much.