7 Replies Latest reply on Feb 12, 2006 12:22 AM by 468183

    FRM-41039: Invalid alert ID 0  - my alert(s) do not display

      I have an alert, the following code is attached to the button trigger when-button-pressed:

           if :customer.cust_name is null or
                :customer.cust_add is null or
                :customer.cust_tel is null or
                :customer.cust_town is null or
                :customer.cust_pcode is null then
           end if;

      I have a Program Unit procedure of:

      PROCEDURE show_mandatory_fields_alert IS
      l_button number;
      l_button := show_alert('1 or more mandatory fields are empty, please correct');
      raise form_trigger_failure;

      I know the alert exists because I forgot to put the "raise form_trigger_failure" statement in the procedure and when I compiled the code for the trigger I kept getting a message about not declaring the variable show mandatory_fields_alert.

      What I am trying to do is display an alert to the user if certain mandatory fields are not populated. Is there a better way of doing this ?? I don't know if the alert code will work even with the way I have that list above using the OR operator.

      Thanks for any help in advance.