Uderc programming article aggregator sites

ON-LOGON does not fire in Form B, called from Form A

Answers: Have 4 answers
We have a situation like this. We are using Forms (Forms [32 Bit] Version (Production)).
We migrated this application to Forms Problem is that the ON-LOGON trigger does not fire in the 2nd level forms. Our application work like this.
(a.) User double-clicks URL icon.
(b.) Form A is opened without asking for un/pwd. We put a NULL; in the ON-LOGON of A.fmb.
(c.) This is the main form of the application. This has a canvas with 6 buttons. Each button will launch it's own separate application with it's own menu.
(d.) Now user presses button in A. This launches Form B. We use
Run_Product(FORMS, 'B', SYNCHRONOUS, RUNTIME,FILESYSTEM, pl_id, NULL);              (e.) Now, in Form B, in the ON-LOGON trigger we have put code to show the logon screen and login to the DB.
Problem is, this works in 10g Forms. But we had to replace the RUN_PRODUCT with a CALL_FORM after migrating to 11g since RUN_PRODUCT is not supported in 11g.
Problem is that when you use CALL_FORM to call Form B, the ON-LOGON of the Form B does not fire. We tried OPEN_FORM and NEW_FORM with different parameters, but the behavior is the same. i.e. ON-LOGON does not fire.
What is the solution or workaround for this please.
Edited by: user12240205 on Oct 15, 2012 4:50 AM
Edited by: user12240205 on Oct 15, 2012 4:52 AM
The best answer: Michael Ferrante (Oracle) wrote:
If you need to open another form you should use CALL_FORM, OPEN_FORM, or NEW_FORM. In these cases, ON-LOGON will not automatically fire because the connect info is passed from the calling form. If you need to login from the called form then you need to need to programatically cause that to occur. Refer to the LOGON and LOGON_SCREEN built-ins in the Builder help for more info. You can fire these from almost any trigger you like, for example in a WHEN-NEW-FORM-INSTANCE trigger or where ever is appropriate for you application.Michael, we tried using the CALL_FORM, OPEN_FORM & NEW_FORM.
Also, there is NO connection to the DB, when B is called from A since we don't login to the DB in A (ON-LOGON has NULL;).
So, if there is no DB connection when B is called, shouldn't the ON-LOGON in B fire?
We tried firing the LOGON_SCREEN and LOGON in the WHEN-NEW-FORM-INSTANCE. But, for some reason, the we don't get the menu (we get a menu not found error). We tried correcting the paths and other things but still no solution.