<-----Google Analytics Code Start----> <-----Google Analytics Code Close---->
Skip to content

Green

color

Default screen resolution  Wide screen resolution  Increase font size  Decrease font size  Default font size  Skip to content Default color Pink color Green color Green color
Home arrow Technical Articles arrow Miscellaneous Technology arrow Switch off CUSTOM.pll programatically
This website has now moved to http://apps2fusion.com





Switch off CUSTOM.pll programatically | Print |  E-mail
Written by Anil Passi   
Saturday, 03 February 2007
Yesterday someone asked me a very interesting question. The question was, how to turn off CUSTOM.pll programatically based on some condition. The idea behind this article is not only to provide solution to this question, but also to discuss another major limitation of forms personalization.

What is the requirement?
Lets say you do not want CUSTOM.pll to be invoked when a specific profile option "XX Disable Custom.pll" is set to Yes.
Effectively we need to be able to programatically switch of CUSTOM.pll


How do I programatically disable CUSTOM.pll ?
CUSTOM.pll gets called from APP_STANDARD package [in APPCORE.pll]. APP_STANDARD is effectively called from all the Oracle Apps Form Triggers. If you open appcore.pll, you will notice that within package app_standard, reference to global variable APP_CUSTOM_MODE made. If global variable APP_CUSTOM_MODE is set to OFF, then CUSTOM.pll does not get called.

How do I doublecheck that above holds true?
Use examine, in normal mode you will notice the value of this global variable as NORMAL


Turn custom code off using help menu, and then you will notice the value of global variable changing.



What are the two options to disable CUSTOM.pll programatically?
Option 1:- Use Forms Personalization


Note: The limitation of Forms personalization, is that you will need to implement this change for each and every FORM/Function separately
This limitation does not exist in CUSTOM.pll as we will see below.

Option 2:- Use CUSTOM.pll [yes CUSTOM.pll to turn off CUSTOM.pll conditionally]
IF event_name = 'WHEN-NEW-FORM-INSTANCE' THEN
    IF fnd_profile.value( 'GL_SET_OF_BKS_ID' ) = 999 THEN
         copy ( 'OFF' , 'GLOBAL.APP_CUSTOM_MODE' ) ;
    ELSE
         copy ( 'NORMAL' , 'GLOBAL.APP_CUSTOM_MODE' ) ;
    END IF ;
END IF ;

So, CUSTOM.pll still rules in certain cases, as in this case whereby you wish to implement a logic spanning multiple forms with few lines of code.



Comments (4)add
...
written by Kishore Ryali , March 26, 2007
very useful article anil.
...
written by Raja Ramesh , July 07, 2007
Hi Anil

Where i have to call this code.

Thanks
RaJaS
...
written by Anil Passi , July 08, 2007
Hi Raja

Thats driven by your requirement.
In the example above, I am calling this from WHEN-NEW-FORM-INSTANCE

Thanks,
Anil Passi
Switching cutom pll back on
written by Pete , October 31, 2007
What can I do if I want to switch off custom pll for one form but switch it on for all others? Can't figure out how to switch it back on
You must be logged in to a comment. Please register if you do not have an account yet.

busy