Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ON-ERROR TRIGGER

goodluck247Jun 29 2016 — edited Jun 30 2016

Hello all,

I have this SAVE button in a Form (DB Block, the only block in the Form):

     ...

     do_key('commit_form');

     clear_form;

     v_alert := show_alert('INSERT_ALERT');

     go_item('FDM_BLOCK.EXIT_BTN');

     ...

I also have a ON- ERROR trigger at Form level:

     ...

     if error_code = 40508 then

        v_alert := show_alert('NULL_ALERT');

        raise form_trigger_failure;

     end if;

     ...

The ON-ERROR trigger fires, the message shows. But then execution transfers back to the SAVE button, and all the code in the button is run.

Eventually, ON-ERROR is fired one more time.

How does ON-ERROR help me recover from this error in a way that the code in the button is not executed right after? What am I missing here?

Thank you.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 28 2016
Added on Jun 29 2016
9 comments
622 views