Translate

Sunday, April 28, 2013

Oracle Form Personalize Condition 11.5 /R12 EBS



Form Personalize with Condition:

Once you confirmed that you are in the right form, access Help --> Diagnostics --> Custom Code --> Personalize.


 Trigger Event

It is important to identify the trigger event to write any form personalization.
For example you are getting a requirement like below.

In the Quick Invoice window, when the Invoice type is selected as 'Credit Memo' , make the Description field as non-editable.

So we need to identify the exact trigger being executed by form when the Invoice type is selected as 'Credit Memo'.

There is a simple way to capture that trigger.

Help --> Diagnostics --> Custom Code --> Show Custom Events.

The below message will appear
"Setting this option will cause a dialog box to be displayed whenever an event is passed to the custom library."

Click on 'OK' and proceed to identify the trigger being executed when the value is changed.

1. Open the 'Quick Invoice' Form
2. Enable display for Custom events Help --> Diagnostics --> Custom Code --> Show Custom Events.
3. Select the Invoice type as 'Credit Memo' and then tab out.
4. Note down the trigger being executed as soon as you tab'd out.

APXIISIM.INVOICES_FOLDER.INVOICE_NUM: WHEN-NEW-ITEM-INSTANCE

The above format is nothing but <FORMNAME>.<ITEMNAME>: <TRIGGERNAME>

So we have now identified the trigger event and trigger object.

Now let us access the Personalization from Help --> Diagnostics --> Custom Code --> Personalize.

Doing it...
'Seq' - is the sequence the personalization gets executed.
'Description' - User entered description
'Level' - Form or Function.

The Personalization can be done either at Fuction or Form levels.

Form Level : Once you do the form personalization at the Form level, it will be reflected in all the functions,forms where
this form is included.

Function Level : if the form personalization is done at the Function level, it will be reflected only in the function. When
the same function is included in any other responsibility, the personalization will get reflected there as well.

Choosing the Level

Choosing the level of personalization is entirely based on the requirement and user needs. But understand the impact when the
personalization is done at the Form level.

'Enabled' - When checked, the personalization will have impact on the Form.
When Unchecked, the personalization is disabled.


For our example scenario, we have identified the trigger event and item name.

The condition for our example is : When the Invoice Type is 'Credit Memo'

When you see the above sentence there are two instance one is 'Invoice Type' and another is 'Credit Memo'.

'Invoice Type' is nothing but the form Item
'Credit Memo' is the value of that form item

Now we need the Item name for 'Invoice Type' to mention in it the Condition so that the form understands our condition.

Getting the Item Name

For any field in a Form, you can get the name of the item and the folder where it resides.

Place your cursor at the field. In our case place the cursor in the Invoice Type field then
click on Help--> Diagnostics--> Examine which will give you the field name ,block name the filed belongs to and the value.

In our case Block Name : INVOICES_FOLDER Field Name: INVOICE_TYPE

It is important to refer a field with the block name.

< BLOCK>.<FIELD>
CONDITION

Trigger Event: WHEN-NEW-ITEM-INSTANCE
Trigger Object:INVOICES_FOLDER.INVOICE_NUM
Condition:

There are properties for each field. for example to get the value of a field, the property name is 'VALUE'. To make the field
editable/non-editable the property name is 'ENTERABLE'. Similary there are more number of properties for a field.

To get the property of any item in the form, the 'Insert 'Get' Expression' button can be used and to get the value of any
item in the form, the 'Insert Item Value' button can be used.

In our case, we need to get the value (property) of Invoice type field (Item).

${item.invoices_folder.invoice_type.value} ='Credit Memo'

ACTIONS

Seq: - is the sequence the personalization action gets executed.
Type: -

Property - To change any item properties
Message - To dispaly any message. Message can be displayed as Warning, Error or Hint.
Builtin - To Launch SRS form,URL,Function, set profile option, execute procedure.
Menu - Any thing related to the Menu and Special Button.

In our case, we are trying to make the Description field read only so the type would be Property.

Object Type : Item
Target Object : INVOICES_FOLDER.DESCRIPTION
Property Name : ENTERABLE
Value : FALSE
So our form personalization to make the Description field read only when the Invoice type is selected as 'Credit Memo' would
be as below

CONDITION

Trigger Event: WHEN-NEW-ITEM-INSTANCE
Trigger Object:INVOICES_FOLDER.INVOICE_NUM
Condition:

${item.invoices_folder.invoice_type.value} ='Credit Memo'
ACTIONS

Seq: 1
Type: Property

Object Type : Item
Target Object : INVOICES_FOLDER.DESCRIPTION
Property Name : ENTERABLE
Value : FALSE

----------------------------------------------------------------------------------------------------------------------

Some Simple Condition For your Reference :
***************************************


1)   :header.receipt_date<(select creation_date from po_headers where     po_header_id=:rcv_transaction.po_header_Id)

2)   SYSTEM.RECORD_STATUS IN ('NEW','INSERT') AND
:USER.USER_NAME IS NOT NULL AND
:USER.EMAIL_ADDRESS IS NULL


3) :VNDR.VENDOR_NAME_MIR != translate(:VNDR.VENDOR_NAME_MIR,'/!;"{}[]|=_*&^%$@~#',' ') 

----------------------------------------------------------------------------------------------------------------------------

2 comments:

  1. Wow awesome, page

    ReplyDelete
  2. Great and I have a nifty present: Where Is Charlotte Church House Renovation remodel outside of house

    ReplyDelete