Anda di halaman 1dari 18

Why Forms Personalization?

 Oracle Supports personalization unlike customization.


 Personalizations are stored in tables rather than files.
 Will not have a bigger impact when you upgrade or apply patches to the environment.
 Can be moved easily through FNDLOAD from one instance to other.
 Can be restricted at site/responsibility/user level.
 Easy to disable/enable with click of a button.
 Personalization stores who columns with which we have the ability to track who created/modified it where
as in CUSTOM.PLL we don’t have that ability.
 Can be applied to new responsibilities/users easily.
 Can be restricted to a function or form.
What can be implemented through Forms Personalization?
The below can be done using Personalization:

 Zoom from one form to another.


 Pass data from one form to another through global variables.
 Change LOV values dynamically.
 Enable/Disable/Hide fields dynamically
 Display user friendly messages when required
 Launch URL directly from oracle form
 Execute PL/SQL programs through FORM_DDL package
 Call custom libraries dynamically
Personalization Tables:
FND_FORM_CUSTOM_RULES

FND_FORM_CUSTOM_ACTIONS

FND_FORM_CUSTOM_SCOPES

FND_FORM_CUSTOM_PARAMS

FND_FORM_CUSTOM_PROP_LIST

FND_FORM_CUSTOM_PROP_VALUES

Invoking the Personalization screen:


The personalization form should be used to implement the custom rules on a specific form. The specific form refers
to the desired form on which you want to apply the custom business logic or modify the form behavior.

The personalization form is invoked by…

Menu Navigation: Help > Diagnostics > Custom Code > Personalize
Disable the personalization feature:
It is possible that a change you make completely breaks a form, to the point that it will not even run! Here’s how to
recover:

 On the pulldown menu, choose Help > Diagnostics > Custom Code > Off
o This will disable all callouts to Forms Personalization
 Run the form of interest
o It should run now, because your changes were skipped
 Invoke the Personalization screen and correct the problem
 On the pulldown menu, choose Help > Diagnostics > Custom Code > Normal to re-enable processing of
Personalizations
Limitations:
Although it is faster than a speeding bullet, it is not able to leap over tall buildings:

 You can only change what Forms allows at runtime:


o Cannot create new items
o Cannot move items between canvases
o Cannot display an item which is not on a canvas
o Cannot set certain properties
o Cannot change frames, graphics, boilerplate
 You can only respond to certain Trigger Events:
o WHEN-NEW-FORM-INSTANCE, WHEN-NEW-BLOCK-INSTANCE, WHEN-NEW-
RECORD-INSTANCE, WHEN-NEW-ITEM-INSTANCE
o WHEN-VALIDATE-RECORD (not in all forms)
o Product-specific events
 May interfere with, or be overridden by, base product code
 Expected user is an Admin/Developer
o Knowledge of Oracle Developer is extremely desirable
o Knowledge of PL/SQL, Coding Standards and/or APIs required in some cases
 Normal rules for customizations apply
o Extensive testing in a Test environment is required!
Relationship with CUSTOM library:
 CUSTOM is a stub library Oracle ships that receives Trigger Events. Customers are free to add any code
they like to it.
 CUSTOM and Form Personalizations drive off the same Trigger Events.
o Form Personalizations are processed first, then the event is sent to CUSTOM
 CUSTOM can do more because it has complete access to all PL/SQL and SQL.
 But for most changes, Form Personalizations is adequate and is significantly simpler.
Ensure to set system profile 'Hide Diagnostics menu entry' to 'No'
and 'Utilities:Diagnostics' to 'Yes'

Components of Form Personalization:


How To make a Field Mandatory in the Form:

Go for Any Perticular Form If you want to personalize, Open that form
Go as specified Navigation in Help ->Diagnostics-> Custom Code -> Personalize
Once Open That let we create 10.1 Seq For Make Field Mandatory (Make sure that This should be Enabled).

Condition->Trigger Event we are selection as WHEN-NEW-FORM-INSTANCE.

Object_type:Item(Column)

Target_Object :MTL_SYSTEM_ITEMS.LIST_PRICE_PER_UNIT_MIP(Which field


you want to make it mandatory select that column as target Object).

Property_Name:Required
How to perform calculations in the field:
Calculations will be done through per each Record so we selected as WHEN-NEW-
RECORD-INSTANCE
Let we calculate this in attirbute_13 in PO_LINES
Meaning of Special fields in Form Personalization:

• Menu(1-15) will be in tools

• Populate tools menu (SPECIAL 1-15)

• Populate reports menu (SPECIAL 16-30)

• Populate actions menu (SPECIAL 31-45)

• It is recommended to use Menu before Tools

Various components used In Form Personalization:

Trigger Event - These are predefined event. Based on the value chosen the function will execute only
when that particular event triggers on the form.

Processing Mode - Query mode or Not in Query mode or Both

Context - At what level like user or Responsibility level


Menu - this is used to call one form from another. it is used to implement the zoom functionality.
There are 45 menu entries which are used to call one form from current form.

Built In - It allows you to call Oracle standard built-in and Functions

Launch a URL
How to hide a field
Form Personalization, Call a Function, And Return Value To Screen?
In from personalization it is possible to call a database function that retrieves values based on other data entered on
the screen by the user. The function then returns these values to a field on the screen. We can use a SELECT
statement to call the function, put the data entered by user in some fields as required parameters to the function and
finally assign the value returned by the function to a field in the form.
Before doing the exercise, please note the below points:
1] Every property that takes a string can either be processed literally or evaluated at runtime.
2] If you type a string in that does not start with ‘=’, then the exact value you type in will be used at runtime.
3] If the string you type starts with ‘=’, then the text immediately after that character will be evaluated at runtime. This
allows you to write complex logic that can include references such as:
 SQL operators, such as ||, TO_CHAR, DECODE, and NVL
 Bind variables (:block.field), including: system: global and: parameter values. Use the ‘Add Item…’ button to
assist with item names.
 Calls to server-side functions that do not have OUT parameters.
4] To use SELECT statement, you must follow these rules:
 The text must start with ‘=SELECT’
 The column being selected must evaluate to a CHAR, with a length no longer than 2000 bytes.
 Your SELECT statement should only return one row, but if more than one is returned only the value of the first
row will be used.
Here is a simple example using a function in the database that queries values, then a personalization that sets the
value queried. This example is defined in the miscellaneous transactions form (INVTTMTX.fmb) and passes the
Project Information (Project Number, Task Number, Expenditure Type and Expenditure Org) to the function.

1 =select xx_getaccount_pkg.main(''||${item.MTL_TRX_LINE.ITEM.value}||'',
2 ''||${item.MTL_TRX_LINE.SOURCE_PROJECT_NUMBER.value}||'',
3 ''||${item.MTL_TRX_LINE.SOURCE_TASK_NUMBER.value}||'',
4 ''||${item.MTL_TRX_LINE.EXPENDITURE_TYPE.value}||'',
''||${item.MTL_TRX_LINE.EXPENDITURE_ORG.value}||'') from dual
5
Note that the variable in this case is written as “${item.MTL_TRX_LINE.ITEM.value}”. The text
“MTL_TRX_LINE.ITEM.” is the Block and Field where the item number is written. The syntax around the block and
field name ensures that the callout is made to replace the value of the item before passing the text to the function.
You can use similar naming for your own fields finding the name of the Block and Field using Help > Diagnostics >
Examine. Also don’t put semicolon (;) after the statement.
Open the form that you want to personalize, then choose Help > Diagnostics > Custom Code > Personalize. In this
case, the miscellaneous transactions form is opened.
Enter the main information about when this personalization will be active.
Use the ‘Validate’ button to test if the syntax of your string is valid. If the evaluation fails, the processing engine will
return an ORA error as if the string had been part of a SQL expression. Otherwise, it will display the text exactly as it
would appear at runtime in the current context.
Enter the action information detailing what the personalization will do. Here select the ‘Property Name’ as VALUE and
then put the above sql statement.

Save the changes and test the personalization.


In this case, the Project Information (Project Number, Task Number, Expenditure Type and Expenditure Org) is
passed from the screen to the database function. The function then derives the GL Account from the above
parameters. The value is then replaced for the Account field on the screen.

Anda mungkin juga menyukai