Re: Exit Form from PRE_FORM Trigger
Date: 1998/03/25
Message-ID: <6fbp7s$eol_at_sjx-ixn6.ix.netcom.com>#1/1
For the form to exit at Pre-Form trigger. Just try the command
RAISE FORM_TRIGGER_FAILURE; after the message is displayed and not EXIT_FORM;
PRE-FORM Trigger
BEGIN
select granted_role into :GLOBAL.User_Role
from user_role_privs
where granted_role like 'OMEGA%'
and rownum = 1;
////
snip (code to adjust menu options as needed)
////
EXCEPTION
WHEN NO_DATA_FOUND THEN
MESSAGE ('USER PRIVILEGES UNAVAILABLE - CONTACT SYSTEM
ADMINISTRATOR');
RAISE FORM_TRIGGER_FAILURE; -- add this line here. and see
END;
Best of luck.
Anu
Ed Jennings wrote in message <35196000.3CA1_at_domain-tech.com>...
>I have a PRE-FORM trigger that checks permissions by interrogating
>the user_role_privs view. If the user has no appropriate role
>assigned, I get an exception and the FORM terminates. I am now
>handling the exception so that I may present an appropriate error
>message to the user. However, this results in the application
>continuing, since the exception is handled. I want to include a
>statement in the exception section to forcibly terminate the
>application. Attempts to user EXIT_FORM result in a FRM-40737 error,
>illegal restricted procedure in trigger. Apparently I can't exit
>from within PRE-FORM. Does anyone have any suggestions for terminating
>the application? I don't want to do it from within the
>WHEN-NEW-FORM-INSTANCE trigger, because it results in the FORM being
>displayed, which contains a Menu that includes sensitive information.
>
>Any suggestions?????
>
>TIA
>
>Ed Jennings
>========================================================================
> PRE-FORM Trigger
>
>BEGIN
> select granted_role into :GLOBAL.User_Role
> from user_role_privs
> where granted_role like 'OMEGA%'
> and rownum = 1;
>
> ////
> snip (code to adjust menu options as needed)
> ////
>
>EXCEPTION
> WHEN NO_DATA_FOUND THEN
> MESSAGE ('USER PRIVILEGES UNAVAILABLE - CONTACT SYSTEM
>ADMINISTRATOR');
> EXIT_FORM;
>END;
>========================================================================
>
>--
>The opinions expressed here are my own, not those of Domain Technologies
Received on Wed Mar 25 1998 - 00:00:00 CET