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.

Wednesday, August 1, 2012

Oracle Forms Personalization

1.      What is Forms Personalization
Form Personalization is a feature that allows us to change the behavior of Oracle Forms-based screens, including changing properties, executing built-ins, displaying messages,  adding menu entries, launching URLs . It is purely declarative in nature.

*      No compilation is necessary to make forms personalizations take effect
*      Multiple users can develop forms personalization at any given point in
time.
*      It is fairly easy to enable and disable forms personalizations.
*      A programmer is not required to do simple things such as hide/disable
fields or buttons.
*      Provides more visibility on customizations to the screen.
*      Personalizations survive patches but you must retest your personalizations every time a patch is applied.

In this section we will go over some of the most commonly done Forms Personalizations. Each personalization will be carried out giving clear step by step instructions. All personalizations will be carried out on the AP Invoice Workbench Form. This form is generally available from

Payables ManageràInvoices:EntryàInvoices
I.       Changing prompts through Personalization
Step 1: Open up the Invoice Entry Form from the navigation shown above. You must see this form

Step 2: In this example we are trying to change the prompt of one of the fields in the Form to achieve what we need. Access the personalization screen by following the navigation given in the screen shot below

Step 3: You must see the following form. Also please read the explanations given against each of the fields in the form

The Conditions tab in a forms personalization represents the “if” part of a personalization i.e. “if all that I am stating here is true” then do something else and this “something else” is mentioned in the Actions tab which we will cover in the next step.
In this example we are stating that At sequence 1 I am defining a personalization which must execute when the triggering event that is fired is “WHEN-NEW-FORM-INSTANCE” . I will not enter any specific condition as of now since I want my personalization to fire everytime the form is launched”

Step 4: Now we move to the Actions tab.

Step 5: Save the personalization. Exit the form and re-launch it and you must see something like this now.

II.    Enabling/Disabling fields through Personalization
Step 1: Let us carry out the enabling/disabling fields in a form personalization on the Payment Terms form in the Payables Responsibility. Navigation: Payables

Managerà SetupàInvoiceàPayment Terms. You should see the following form:

Step 2: What we are trying to achieve in this form is that whenever the Description field is entered as “No Rank” then the Rank field should get disabled

Step 3: Enter the personalization Condition as follows

In order to enter the condition as shown in the screen shot shown above. Follow the steps below .
Navigate into the Condition box.

Once you click ok in the above box you will get something like : ${item.ap_terms.description.value} in the Condition box. To this add =’No Rank’

Step 4: Now navigate to the Actions tab

Step 5: Now save the personalization . Close the Form and re-launch it again . Try entering the Description field as No Rank and then navigate to the Rank field and observe that the field is disabled for insertion

In a similar manner fields which are otherwise disabled for update can be enabled by setting the Insert Allowed property to True

III. Launching URLs through Forms Personalization
Step 1: Open up the Payment Terms form once again. What we are trying to achieve through this personalization is demonstrated in the screen shot below

Then final result here will be that when the user clicks on the Launch Google menu item in the Actions Menu the google page must open up. Let us see how this can be done.

Step 2: Navigate to the Personalizations form. The first thing we have to do is to create a Menu item in the Actions Menu which can be used as a hook to launch the URL .


Step 4: Next let us write a capturing point for this trigger event
SPECIAL:35. It must be noted that all SPECIAL trigger events can be initialized / set only in the WHEN-NOW-FORM-INSTANCE trigger

Step 5: Navigate to the Actions tab

Save the Personalization. Close the form and re-launch it.

Step 6: Click on ActionsàLaunch Google and you must see something like this

IV. How to call PL/SQL code from Forms Personalization
Step 1: In this example we will call a PL/SQL procedure through Forms Personalizations. We will use the invoice payment terms form like we had in the previous example.

Step 2: Before we create a personalization that will call a PL/SQL procedure we need to create a simple ‘do-nothing’ pl/sql procedure. We will pass one argument to this procedure to see how values from a Form can be passed into a PL/SQL procedure through personalization

Step 3: Let us create a dummy PL/SQL procedure first. From your SQL*Plus enter the following

CREATE OR REPLACE PROCEDURE TEST_PERSONALIZATION(p_text_argument_in IN VARCHAR2)
IS
BEGIN
      INSERT INTO fnd_log_messages (module, log_level, MESSAGE_TEXT, user_id, TIMESTAMP, AUDSID, log_sequence)
      VALUES ('AP', 1, p_text_argument_in, fnd_global.user_id, SYSDATE,-99, fnd_log_messages_s.NEXTVAL);-- This will help us know if the personalization fired and entered a row into this table. This is a table used for writing log messages in Oracle Apps
COMMIT;
END TEST_PERSONALIZATION;


Step 4:  The first step is to create a menu item to provide us with a hook to call a PL/SQL Procedure. Open up the personalization form and enter the following personalization rule and actions

Now for the Action

Step 5: Next we have to create a personalization to capture SPECIAL39 event.





Step 6: Now finally save the personalization . Close the form and relaunch it and you should see something like this

Step 7: Verify from the fnd_log_messages table that a row has got inserted with the description we used above.


Following are the limitations of Forms Personalizations:
àNew items cannot be created
àItems cannot be moved between canvases
àItems which are not on a canvas cannot be displayed
àDatatype of an item cannot be set
àFrames, Boilerplate or Graphics cannot be changed
àThis feature only responds to events that are supported by APPCORE. These are limited to
  • WHEN-NEW-FORM-INSTANCE, WHEN-NEW-BLOCK-INSTANCE,WHEN-NEW-RECORD-INSTANCE, WHEN-NEW-ITEM-INSTANCE
  • WHEN-VALIDATE-RECORD(not in all Forms). This event is generally fired when the current record in the current block has undergone some change
  • Populate tools menu (MENU1-15)
  • Populate tools menu (SPECIAL 1-15)
  • Populate reports menu (SPECIAL 16-30)
  • Populate actions menu (SPECIAL 31-45)

Like all other entities Personalizations can also be imported/exported using FNDLOAD command
To download rules for a particular function
FNDLOAD <userid>/<password>  0 Y DOWNLOAD $FND_TOP/patch/115/import/affrmcus.lct <filename.ldt> FND_FORM_CUSTOM_RULES function_name = <function_name>
The function name can be seen from the Personalization screen at the top left corner.

To download for a particular form
FNDLOAD <userid>/<password>  0 Y DOWNLOAD $FND_TOP/patch/115/import/affrmcus.lct <filename.ldt> FND_FORM_CUSTOM_RULES form_name = <form_name>

To download all personalizations , all forms and all functions
FNDLOAD <userid>/<password>  0 Y DOWNLOAD $FND_TOP/patch/115/import/affrmcus.lct <filename.ldt> FND_FORM_CUSTOM_RULES

Upload:
FNDLOAD <userid>/<password> 0 Y UPLOAD  $FND_TOP/patch/115/import/affrmcus.lct <filename.ldt>

Forms personalization is a very powerful feature and has the capacity to fundamentally alter the behavior of Oracle Applications, so you would not want everyone to have access to it . We can restrict the users who have access to by setting the following profiles appropriately

  • Set Profile Option Hide Diagnostics menu entry to No
         Yes will hide the diagnostics menu.
  • Profile Option Utilities: Diagnostics – if set to No, apps
password is required to open up the personalization screen

1 comment:

Anonymous said...

3/9/2017 Images are not visible. This article would really help me personalize the invoice workbench.

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