Re: Exit Form from PRE_FORM Trigger

From: Joe Strano <jstrano_at_dulcian.com>
Date: 1998/03/26
Message-ID: <6fcolh$404_at_bgtnsc03.worldnet.att.net>#1/1


Where is this application being called from? If it is called from a menu of some kind, can you check the role there, before the form is ever called? If not, let me know and I'll try again.

Joe Strano
Dulcian, Inc.


Ed Jennings wrote:

> 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 Thu Mar 26 1998 - 00:00:00 CET

Original text of this message