-----Google Analytics Code Start----> <-----Google Analytics Code Close---->
|Receive Email for New Articles|
|Switch off CUSTOM.pll programatically||| Print ||
|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' ) ;
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.
written by Kishore Ryali , March 26, 2007
written by Raja Ramesh , July 07, 2007
Switching cutom pll back on
written by Pete , October 31, 2007