This content has been marked as final. Show 4 replies
First, i would remove the IF FORM_SUCCESS-part in your PRE-INSERT-trigger.1 person found this helpful
Are you sure the trigger doesn't fire at all? Where do have defined the PRE-INSERT-trigger (form, block, item)? Are you sure you have a newly created record in your form? I would also try the same without your KEY-COMMIT-trigger (just to check).
Thank you for you response.
As you told me I removed the IF FORM_SUCCESS part from the PRE-INSERT-TRIGGER, except this I didn't change anything. My trigger is created FORM-LEVEL. I made a small change in the :PHD_PO# TEXT ITEM. I changed the REQUIRED to be as NO. Now the trigger is firing and creating unique numbers as well. What could be the reason for this? Thank you for you response
Before you can commit, forms makes sure all data in your form is valid. And if you define a visible item as required, forms will check if it has a value, otherwise it cannot commit.1 person found this helpful
The problem is here:1 person found this helpful
By setting Message_Level to 25, you are hiding error messages that you SHOULD see. Setting it to 25 caused your "Field is required" message to be hidden.
v_msglvl := :SYSTEM.MESSAGE_LEVEL; :SYSTEM.MESSAGE_LEVEL := 25; COMMIT_FORM; :SYSTEM.MESSAGE_LEVEL := v_msglvl;
Set Message_Level to zero and never set it higher. If there is any message you need to treat specially, do so in the on-error form-level trigger.