Aug 1, 2011
Implementing Key & Descriptive Flex Fields
Implementing Key Flexfields
Key flexfields can be implemented for the following three types of forms, which are each implemented differently:
Combinations form :
Form with foreign key reference :
Form with key flexfield range :
To implement a key flexfield you must:
· Define key flexfield columns in your database.
Create a combination table, which stores the Flexfield combination entered by user. Combination form allows one to difine valid combinations. In Forms with foreign key reference AOL dynamically create the combination. Addition to combination tables for KFF, there may be one or more tables for forms with foreign key reference and for forms with key flexfield ranges.
· Register your table with Oracle Application Object Library.
After creating the combination table, you must register your table with Oracle AOL using the Table Reginstration API.
· Register your key flexfield with Oracle Application Object Library.
Register the KFF using the KFF window. Identify the combination table in which it resides and the names of the unique ID and structure defining columns. Define flexfield Qualifier if you want ot ensure the user customizes your KFF to include segments your application needs.
· Add key flexfield routines to your forms .
Once you have the appropriate table columns and your flexfield is registered, you can build your flexfield into your application forms.
Implementing Descriptive Flexfields
Reference fields are those from which a descriptive flexfield can get a context field value.
Define descriptive flexfield columns in your database. You specify fields as reference fields when you register your descriptive flexfield in the Register
· Define descriptive flexfield columns in your database
i. Define a column for each descriptive segment.
ii. Define a structure defining column to identify you DFF structures.
nce structure defined, cannot be changed later)
DFF can be added to a table with existing data. (Ensure data consistencies).
To add a flexfield, add column, form fields, and invoke descriptive flexfield routine as for a new DFF. The DFFs that cannot be changed by an installer or user are called "Protected DFFs". This is created by just checking the protected check box in the DFF form.
· Register the DFF table with Oracle Application Object Library.
After the addition of DFF columns to the table, register the table with AOL using Table Registration API.
· Register DFF with Oracle Application Object Library.
Register the DFF with AOL using Register DFF form. Identify the application table in which it resides and the name of the structure defining column.
· Add descriptive flexfield routines to your forms.
Once table columns and flexfileds are registered, build your flexfield into application forms.
Adding Flexfields to forms : Four steps to call the defined and registered flexfields
· Create hidden fields: Create your hidden flexfield fields as part of creating your default form block from the database table (or view). Set the canvas property of the flexfield fields to null.
· Create displayed fields:
· Create flexfield definition : Call a flexfield definition procedure from your WHEN– NEW– FORM– INSTANCE trigger to set up your flexfield.
· Invoke your flexfield definition from several event triggers:
PRE– QUERY FND_FLEX.EVENT(’PRE– QUERY’);
POST– QUERY FND_FLEX.EVENT(’POST– QUERY’);
PRE– INSERT FND_FLEX.EVENT(’PRE– INSERT’);
PRE– UPDATE FND_FLEX.EVENT(’PRE– UPDATE’);
WHEN– VALIDATE–RECORD FND_FLEX.EVENT(’WHEN– VALIDATE–RECORD’);
WHEN– NEW– ITEM–INSTANCE FND_FLEX.EVENT(’WHEN– NEW– ITEM– INSTANCE’);
WHEN– VALIDATE–ITEM FND_FLEX.EVENT(’WHEN– VALIDATE– ITEM’);
Code all the flexfields triggers at the form level for convenience and consistency.
Register Key Flexfields
Register a key flexfield after defining the flexfield combinations table in the database, and after registering your table using the table registration API.
Register Descriptive Flexfields