Join the OracleApps88 Telegram group @OracleApps88to get more information on Oracle EBS R12/Oracle Fusion applications.

If you are facing any issues while copying the Code/Script or any issues with Posts, Please send a mail to OracleApp88@Yahoo.com or message me at @apps88 or +91 905 957 4321 in telegram.

Thursday, December 29, 2016

Usage of Custom Library CUSTOM.pll in Oracle Personalizations

 Note 438920.1: How To Customize Standard Oracle Application Using Custom Library?

1. Note 417293.1: Can You Disable The New Quote Button On The Sales Order Form:
This note provides a sample code to disable the button from a form.

2. Note 393169.1: How To Refer :Block.field In The DFF Definition Of Mass Change (OEXOEMCG) Form
This note describes how to pass the current values from one field to the DFF segments. A sample example has been provided to replace a global variable instead of hard coded reference to a field within the DFF definition.

3. Note 434383.1: How To Tell if custom.pll is being called by WHEN_NEW_ITEM_INSTANCE Trigger on Sales Order Form
This note explains whether the triggers are picked up from custom library or native code and a simple way to find the names of trigger, item, block and form name, which are referenced in custom library.

4. Note 160151.1: How to Prevent Users From Accessing the Help > Diagnostics > Examine Functionality
This note describes how to restrict accessing the diagnostics and password for examine functionality from Help based on the user or responsibility.

5. Note 438787.1: What are the events passed using Custom library and when do they fire?
This note describes about the various events and their occurrences in the custom library.

6. Note 434383.1 How To Tell if custom.pll is being called by WHEN_NEW_ITEM_INSTANCE Trigger on Sales Order Form
Need to fire the Custom.pll program from the when_new_item_instance trigger from any field on sales order for.

7. Note 438787.1 Understanding Events Passed Using Custom Library 
This document explains about the events, different kinds of events and their firing time within the custom library.

8. Why are some generic events not being fired in some cases?
The form may have these triggers at block/field level, where the property- Execution Hierarchy for the trigger might be OVERRIDE. Due to this, the corresponding form level triggers to invoke CUSTOM.pll do not fire. The Override would prevent the form to call the Custom code. In this case please raise an SR with Oracle Support

9. What are the components are available in the custom library?
The CUSTOM package has two functions and one procedure:
Functions -
CUSTOM.ZOOM_AVAILABLE
CUSTOM.STYLE
Procedure -
CUSTOM.EVENT

CUSTOM.ZOOM_AVAILABLE allows you to specify if zooms exist for the current context. If zooms are available for this block, then return TRUE else return FALSE. This return a Boolean value
CUSTOM.STYLE allows determining the execution style for some product specific events. This would return a Integer
CUSTOM.EVENT allows you to execute the custom code at specific events

10. Does the custom library need any attached library?
Other libraries can be attached to CUSTOM library. However, it is not possible to attach the APPCORE library to CUSTOM because it would cause a recursion problem (CUSTOM is already attached to
APPCORE). In Release 11i, it is possible to attach the APPCORE2 library to CUSTOM library which is a duplicate of APPCORE. APPCORE2 has most of the APPCORE routines with the following packages:
  • APP_ITEM_PROPERTY2
  • APP_DATE2
  • APP_SPECIAL2
These packages contain the same routines as the corresponding APPCORE packages. The CUSTOM library comes with the FNDSQF library already attached. FNDSQF provides Oracle Applications routines for function security (for opening forms), flex fields, and other utility routines.
Hence the execution will be in the following manner
APPCORE-->CUSTOM-->APPCORE2 if there is a need to APPCORE2

11. What would be the precedence if both custom library and Forms Personalization have the same set of events?
Oracle Forms Libraries first invoke the Forms Personalization, and then call goes to the CUSTOM library for the same set of events. Forms personalization will override if the same set of events are passed as that of CUSTOM library.
The first call goes to Form personalization from Oracle Form libraries so the customization done using form personalization will be effective even if same set of events are available in custom library. So in this case custom library would not effective.

12. What is difference between Form personalization and custom library?
Form Personalization is an alternative way to do the same task as done in the custom library. Form Personalization has all the common used activities of CUSTOM library.
However form personalization has its own limitation, which does not allow achieving complex business logic's.
Limitations of Form Personalization:
Form Personalization allows you to respond to a Zoom event - it does not allow you to enable Zoom on a form. If you want to do that you must use CUSTOM library - custom.pll

13. How to isolate the problematic code which causes the error from custom library?
1. Switch off the customization by navigating to Help --> Diagnostics --> Custom --> Custom Off
2. Reproduce the issue.

       If the issue still exists the issue is due to Oracle native code.

       If the issue does not exists then the issue is due to custom code.
           Debugging the custom code:
           Find the name of the form from which the issue happens.
           Open the custom.pll
           Find the code, which contains the problematic form name.
           Redefine the code and then retest the issue.

14. Can we use the custom library for custom forms?
Yes, CUSTOM library can be used with custom forms as long as the custom forms are developed as per standards of Oracle Application Developer Guide using TEMPLATE.fmb

15. Can we use all form objects in custom library? 
It is not possible to use all the form objects in standard Oracle Application. Since some built-in form objects are incompatible to oracle Applications routines. These Oracle Forms built ins have equivalent APPCORE routines that provide additional functionality.

For example:
Set_ITEM_PROPERTY is replaced with APP_ITEM_PROPERTY.SET_PROPERTY These APPCORE routines set the properties in the Oracle Applications standard way and change the propagation behavior. Some properties use the native Oracle Forms SET_ITEM_PROPERTY.

16. How to switch off the custom code at the run time?
APP_STANDARD package in APPCORE calls the custom library. APP_STANDARD is effectively called from all the Oracle Apps Form Triggers. In appcore.pll a reference to global variable APP_CUSTOM_MODE is made. If global variable APP_CUSTOM_MODE is set to OFF, then CUSTOM.pll does not get called.

This is similar to switching off the custom code using Help --> Diagnostics --> Custom --> Custom Off
Note: Switching off customization means that Codes written in custom library and for personalization are switched off. This does not switch off Custom triggers or Custom code written on the standard forms.
A sample code for switch off customization for specific user_name
IF event_name = 'WHEN-NEW-FORM-INSTANCE' THEN
 IF fnd_profile.value('USER_ID') =1318 THEN
  copy ( 'OFF' , 'GLOBAL.APP_CUSTOM_MODE' ) ;
 ELSE
  copy ( 'NORMAL' , 'GLOBAL.APP_CUSTOM_MODE' ) ;
 END IF ;
END IF ;


17. Note 744065.1 Sample CUSTOM Library Code To Customize Applications 
This note provides examples of using CUSTOM Library to enhance the functioning of Oracle Application forms so that customers can meet their business needs and to understand the usage of custom library, please DONOT try to attempt simulation since this may affect standard functionality.

18. Note 1234454.1 'Descriptive Flex' In 'Copy Lines' Is Automatically Selected
This note provides an example of how to implement custom code to default this checkbox as UNCHECKED for Descriptive Flex field.

19. Note 749405.1 How To Commit Changes Made Using Event When-Validate-Record In CUSTOM Library 
How does one commit the changes performed in When-Validate-Record Event from the Custom Library?

No comments:

Post a Comment

If you are facing any issues while copying the Code/Script or any issues with Posts, Please send a mail to OracleApp88@Yahoo.com or message me at @apps88 or +91 905 957 4321 in telegram.
Best Blogger TipsGet Flower Effect