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.