Exit Form from PRE_FORM Trigger

From: Ed Jennings <e.jennings_at_domain-tech.com>
Date: 1998/03/25
Message-ID: <35196000.3CA1_at_domain-tech.com>#1/1


[Quoted] [Quoted] 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

Original text of this message