11 i 10 at Form Personalization

153

Transcript of 11 i 10 at Form Personalization

Page 1: 11 i 10 at Form Personalization
Page 2: 11 i 10 at Form Personalization

Form Personalization

Page 3: 11 i 10 at Form Personalization

Agenda

Customer Forms Personalization presentation

Forms Personalization form high level overview

Forms Personalization expressions and sample message generation

Demo scenarios and look behind the scenes

Goal:

Provide introduction, background, and working example takeaways to use as models for your own situations.

Page 4: 11 i 10 at Form Personalization

For Business User Presentation…

Page 5: 11 i 10 at Form Personalization

All customers desire to: Remove fields, buttons, tabs, etc. from the screen because

they never use them Re-label fields, buttons, tips to match their terminology Change the default value of fields Allow easy access from one form to another, passing context Add additional business logic/practices/messages Do any of the above for only a particular user or

responsibility Do any of the above only if certain conditions are true. Do all of the above in a upgradeable manner without writing

code, and without violating Support agreements

Page 6: 11 i 10 at Form Personalization

Major Business Benefits

• Change the product to match your business processes, not vice versa

• Implement your Security, your Navigation, your Defaults, your Terminology…

• Changes can be built, tested and deployed in minutes• Most changes can be entered by functional experts, not

technical experts• Multi-Language: Every Action can be associated with

one language, or all languages.• Changes are not customizations to standard Oracle

forms code• Upgradeable (but they do need to be tested)

Page 7: 11 i 10 at Form Personalization

Support of additional business

logic/practices (e.g. Hold

Order)

Form Personalization Example:

Create pop-up messages generated

for/with specific conditions and/or

data

Modify prompt/field title, remove fields, change entry order. Change default

values, auto-fill or validate data based on business rules,

make fields mandatory

Add menu items, and shortcuts to

other forms/URLs, with data/parameter

passing

Add/enable icons

Page 8: 11 i 10 at Form Personalization

For IT/Technical Presentation…

Page 9: 11 i 10 at Form Personalization

Overview of Form Personalization

• Allows you to make declarative changes to a form (not changes to code)

• Changes are applied at runtime when the proper trigger event (e.g. field to field navigation) occurs.

• Change object properties (e.g. name/title)• Display messages to user• Activate additional menu entries • Execute certain Forms builtins (e.g. database

procedure call, ‘Do’ key, open form/URL)• Based on definable Conditions• For a Site, Responsibility, Industry, or User

Page 10: 11 i 10 at Form Personalization

You don’t have to think like a developer – Objects with prompts, titles or labels can be selected by their current on-screen

text

But, textual values and conditions offer powerful capabilities if you do want to think like a developer

– :block.fields (current form and system values)– SQL functions/procedures– server-side functions– SELECT statements

All changes can be ‘Applied’ or ‘Validated’ immediately to see their effect All changes can be disabled at multiple levels

– All, Rule, or Action

The UI Personalization Experience

Page 11: 11 i 10 at Form Personalization

For Existing Customer Presentation….

Page 12: 11 i 10 at Form Personalization

Relationship to CUSTOM.PLL library

CUSTOM.PLL is a stub library Oracle ships that receives certain form events. Customers are able to freely add any code they like to it.

– It is an Oracle Forms library, so you must use Oracle Developer to edit and generate it

CUSTOM .PLL can do more because it has complete access to all PL/SQL and SQL

But Form Personalization can probably handle the vast majority of your changes.

Form Personalizations, and changes to the CUSTOM .PLL library, can co-exist

Page 13: 11 i 10 at Form Personalization

‘Validate All’ will test the existence of all object references in your Personalizations after applying a patch (but no substitute for regression testing).

Available as part of the FND 11.5.10 minipack, patch 3262159

Separate APPCORE rollup patch 3358850 shortly after the release of 11.5.10 (since it contains a significant amount of code from the FND 11.5.10 minipack, and we strongly encourage you to consider the minipack instead.)

FAQs

Page 14: 11 i 10 at Form Personalization

Forms Personalization Form Overview

Page 15: 11 i 10 at Form Personalization
Page 16: 11 i 10 at Form Personalization
Page 17: 11 i 10 at Form Personalization
Page 18: 11 i 10 at Form Personalization
Page 19: 11 i 10 at Form Personalization
Page 20: 11 i 10 at Form Personalization
Page 21: 11 i 10 at Form Personalization
Page 22: 11 i 10 at Form Personalization
Page 23: 11 i 10 at Form Personalization
Page 24: 11 i 10 at Form Personalization
Page 25: 11 i 10 at Form Personalization
Page 26: 11 i 10 at Form Personalization

Value field options (Properties/Messages)

Hi there World!Constant:

='Hi there '||:po_headers.vendor_nameExpression:

=SOME_DATABASE_FUNCTION(:po_headers.vendor_id )

Expression (DB function):

=SELECT vendor_name "A" from po_vendors where vendor_id = :po_headers.vendor_id

SQL Statement:

Note: 2000 character limit (text length and return value)!

Page 27: 11 i 10 at Form Personalization

PO_HEADERS.VENDOR_SITE_CODE

Scenario:Display some messages when the Supplier is entered:

(‘Hi There’, Vendor_ID, and # Open AP invoices)

Page 28: 11 i 10 at Form Personalization
Page 29: 11 i 10 at Form Personalization
Page 30: 11 i 10 at Form Personalization
Page 31: 11 i 10 at Form Personalization

Note: Column alias of “A”

Page 32: 11 i 10 at Form Personalization
Page 33: 11 i 10 at Form Personalization
Page 34: 11 i 10 at Form Personalization
Page 35: 11 i 10 at Form Personalization
Page 36: 11 i 10 at Form Personalization
Page 37: 11 i 10 at Form Personalization
Page 38: 11 i 10 at Form Personalization

Navigating Form to Form (Zoom)

Page 39: 11 i 10 at Form Personalization

Navigating Form to Form (Zoom)

‘Sending Form’ and ‘Receiving Form’

Parameter passing not necessary (but nice)– Sending form sets variable/parameter to pass

– Receiving form gets variables/parameter

SPECIAL menus– Special1 – Special15 – ‘Tools’ Menu

– Special16 – Special30 – ‘Reports’ Menu

– Special31 – Special45 – ‘Actions’ Menu

Zoom icon/button ( ) – R.I.P.

Page 40: 11 i 10 at Form Personalization

Receiving Form parameter passing Options

1. Form-coded Parameter (un-documented):– Calling form passes right parameter(s)/value(s)

2. Query By Example (QBE):– Query Enter, set value, clear variable, Do query

3. Find Screen:– Go to Find Block, set value, clear variable, Next

Block, Clear fields on Find block

4. Default WHERE clause for block:– Set WHERE clause block, clear variable, execute

query, reset WHERE clause

Page 41: 11 i 10 at Form Personalization

Abbreviations

WNFIWHEN-NEW-FORM-INSTANCE

WNII WHEN-NEW-ITEM-INSTANCE

WNBI WHEN-NEW-BLOCK-INSTANCE

WNRI WHEN-NEW-RECORD-INSTANCE

WVR WHEN-VALIDATE-RECORD

Page 42: 11 i 10 at Form Personalization

Sending Form – Parameter passing Process Details

1. WNFI: A. Enable Tools/Action/Reports menu option (and

optional icon) for desired block(s)

2. SPECIALnn: A. Save form field(s) to be passed in Global variable(s)

B. Builtin FND_FUNCTION.EXECUTE (form) or FND_UTILITIES.OPEN_URL (web)

Hint: Test process manually to insure that it works

Page 43: 11 i 10 at Form Personalization

Receiving Form – Parameter passing Process Details

1. WNFI: Set “Initial Value” for Global variable(s) (prevents errors if Global variable does not exist during condition test)

2. WNRI: If Global variable has value (initiate query):A. (QBE or WHERE Clause): Do_Key Enter_Query

or

B. (Find Form): Go_Block find_block_name (unless form automatically starts in Find Screen/Block)

Page 44: 11 i 10 at Form Personalization

Receiving Form – Parameter passing Process Details

3. WNRI: If Global variable has value (and in ‘Enter-Query’ Mode for QBE or WHERE Clause):

QBEa. Set search field(s)

from global variable(s)

b. Clear global variables to prevent re-fire

c. Initiate Search Execute_Query

Find Forma. Set search field(s)

from global variable(s)

b. Clear global variables to prevent re-fire

c. Initiate Search Next_Block

d. Clear Find Block fields(s)

Hint: Test process manually to insure that it works

Default WHEREa. Set block WHERE

clause from global variable(s)

b. Clear global variables to prevent re-fire

c. Initiate Search Execute_Query

d. Reset WHERE clause

Page 45: 11 i 10 at Form Personalization

Real Demo Experience #1

Page 46: 11 i 10 at Form Personalization

Requirement:Zoom to Supplier screen for selected

Supplier

Page 47: 11 i 10 at Form Personalization
Page 48: 11 i 10 at Form Personalization
Page 49: 11 i 10 at Form Personalization
Page 50: 11 i 10 at Form Personalization

Behind the Scenes (Sending Form):AP Invoice Form Personalizations

1. Add the ‘View Supplier’ Option

2. Execute code when ‘View Supplier’ Option (Special45) selectedA. Save Vendor Name

B. Open Supplier Form

Page 51: 11 i 10 at Form Personalization
Page 52: 11 i 10 at Form Personalization

Note: No ‘.gif’ in icon name. Icon needs to reside in ‘http://laXXXX.oracleads.com/OA_JAVA/oracle/apps/media/’. See Presenter’s notes at end of presentation for HTML to view standard icons and names in directory (over 6100 gif files!).

Page 53: 11 i 10 at Form Personalization
Page 54: 11 i 10 at Form Personalization
Page 55: 11 i 10 at Form Personalization

Bug/Anomaly: When searching for a Function Name, use ‘%’ to display all functions and then refine search with function name (e.g. ‘%Suppl%’)

Page 56: 11 i 10 at Form Personalization

Behind the Scenes (Receiving Form) Supplier Form Personalizations: QBE

1. Initialize global variables (just in case they don’t exist)

2. If global variable is not null go into Query By Example mode (QBE)

3. If global variable is set and in QBE, set search field, clear global variable, execute query

Page 57: 11 i 10 at Form Personalization

VNDR.VENDOR_NAME

Page 58: 11 i 10 at Form Personalization
Page 59: 11 i 10 at Form Personalization

INITIAL VALUE: Create the Global if it doesn’t exist, but leave current value alone if it does exist.

Page 60: 11 i 10 at Form Personalization
Page 61: 11 i 10 at Form Personalization
Page 62: 11 i 10 at Form Personalization
Page 63: 11 i 10 at Form Personalization
Page 64: 11 i 10 at Form Personalization
Page 65: 11 i 10 at Form Personalization
Page 66: 11 i 10 at Form Personalization

Same problem, different approach..

Behind the Scenes (Receiving Form) Supplier Form Personalizations utilizing

the Find Form instead of QBE

Page 67: 11 i 10 at Form Personalization

Behind the Scenes (Receiving Form) Supplier Form Personalizations: Find Form

1. Initialize global variables (just in case they don’t exist)

2. If global variable is not null go to Find Block

3. If global variable is not null and in Find Block set search field, clear global variable, do Next_Block, clear Fields on Find Block

Page 68: 11 i 10 at Form Personalization

VNDR_QF.VENDOR_NAME

Page 69: 11 i 10 at Form Personalization
Page 70: 11 i 10 at Form Personalization
Page 71: 11 i 10 at Form Personalization
Page 72: 11 i 10 at Form Personalization
Page 73: 11 i 10 at Form Personalization
Page 74: 11 i 10 at Form Personalization
Page 75: 11 i 10 at Form Personalization
Page 76: 11 i 10 at Form Personalization
Page 77: 11 i 10 at Form Personalization
Page 78: 11 i 10 at Form Personalization

Find Form sets the vendor number once the vendor name is set, so need to clear both!

Page 79: 11 i 10 at Form Personalization

Real Demo Experience #2

Page 80: 11 i 10 at Form Personalization

Requirement:Task Type determines task Owner (and Owner Type)

Page 81: 11 i 10 at Form Personalization

WNII EventWNII Event

WNII Event

WNII Event

WNII Event

No Event!

Changed the Tab order with Forms Personalizations

Problem (and Solution)

Forms Personalizations then populates these

based on Problem type

Page 82: 11 i 10 at Form Personalization

Behind the Scenes:Interaction Wrap-up Form Personalizations

1. Set Navigation Order

2. If in Description fieldA. Set Owner Type (screen value and code)

B. Set Owner (screen value and ID)

C. Set Owner valid (as if user navigated through field)

Page 83: 11 i 10 at Form Personalization
Page 84: 11 i 10 at Form Personalization
Page 85: 11 i 10 at Form Personalization
Page 86: 11 i 10 at Form Personalization
Page 87: 11 i 10 at Form Personalization
Page 88: 11 i 10 at Form Personalization
Page 89: 11 i 10 at Form Personalization
Page 90: 11 i 10 at Form Personalization
Page 91: 11 i 10 at Form Personalization

Fake Demo Experience #3

Page 92: 11 i 10 at Form Personalization

Requirement:Prevent access to the

‘Bank Accounts’ tab for the user ‘MFG’

Page 93: 11 i 10 at Form Personalization
Page 94: 11 i 10 at Form Personalization
Page 95: 11 i 10 at Form Personalization

Behind the Scenes:Customers Form Personalization

1. WNBI @CUST_BANK block for User MFG:A. Builtin Go_Block, CUST_PAYMETH

Page 96: 11 i 10 at Form Personalization
Page 97: 11 i 10 at Form Personalization

You can apply the same concept to prevent update to a field (but have the contents still visible):

WNII@field, use Builtin Go_Item to go to next field

(the ‘Alterable’ property might also work)

To hide a field, set Property “Displayed” = False

Page 98: 11 i 10 at Form Personalization

FORMS_DDL Builtin

Page 99: 11 i 10 at Form Personalization

FORMS_DDL Builtin

FORMS_DDL Built in allows execution of a PL/SQL block:

– 2000 characters or less– Difficult to pass parameters in, no bind variables,

so must create a single concatenated string for statement that will be executed: FORMS_DDL( 'Begin

Update_Employee('||TO_CHAR(:emp.empno) ||');

End; ' );– No way to get return value/status out, but there

are ways….

Page 100: 11 i 10 at Form Personalization

Real Demo Experience #4

Page 101: 11 i 10 at Form Personalization

Requirement:Place line on hold if

margin goes below 30%

Page 102: 11 i 10 at Form Personalization
Page 103: 11 i 10 at Form Personalization
Page 104: 11 i 10 at Form Personalization

procedure hrd_add_order_hold(i_HOLD_ID number,i_HOLD_ENTITY varchar2 -- (O=Order, I=Item ),i_HOLD_ENTITY_id1 number -- (O=header_id , I=Inventory_item_id),i_HOLD_COMMENT varchar2 default null,i_header_id number -- Order header id,i_line_id number default null ) -- line id

Note: Building a string to execute requires use of || to

include form/global variables and '' around the constant for

the Hold Comment

Page 105: 11 i 10 at Form Personalization
Page 106: 11 i 10 at Form Personalization
Page 107: 11 i 10 at Form Personalization

FORMS_DDL passing parameters

In:– Form/Global variables need to be concatenated into

string that will be executed by FORMS_DDL. Watch constants that need to be surrounded by single quotes

Out:– Results of PL/SQL block can be pushed onto a virtual

stack within PL/SQL block– Results can then be pulled off virtual stack in

additional/next Action step– HRD_STACK code for manipulating a private virtual

stack is in presentation notes on another slide

Page 108: 11 i 10 at Form Personalization

Db Function or stored procedure with ‘OUT’ parameters i.e.:

stored_procedure(v_in ,v_results)

hrd_stack_push(token,value) places value on a virtual stack

labeled with token name

Note: Building a string to execute requires use of || to

include form/global variables and '' around token constant

RESULTS in hrd_stack_push()

Page 109: 11 i 10 at Form Personalization

hrd_stack_pull(token) pulls the value from a virtual stack labeled with token name

(or returns null if doesn’t exist)

Page 110: 11 i 10 at Form Personalization

Stack Manipulation Functions/Procedures:

HRD_STACK_PUSH ( token name, value ) – Pushes value on stack under token name

HRD_STACK_PUSH_F ( token name, value ) – Same as above, but a function (returns varchar2) instead of a stored procedure (can be used in SELECT statement)

HRD_STACK_PULL ( token name ) – Function that returns value (or null) stored on stack under token name and removes value from the stack (destructive)

HRD_STACK_PEEK ( token name ) – Function that returns value (or null) stored under token name BUT KEEPS value on the stack (non-destructive) (Used for testing for a value still keeping it available for use.)

HRD_STACK_PURGE – Purges contents of stack for user Code is in Speaker Notes for this slide

Page 111: 11 i 10 at Form Personalization

HRD_STACK – How it works

Creates a custom table HRD_STACK to store user ID (unique ID per user and session), token name, and value

Token/value pairs are stored or read/deleted in table under autonomous transactions (commits are independent of calling procedures)

Function form of HRD_STACK_PUSH (HRD_STACK_PUSH_F) useful for placing values on the stack with SELECT statements:

– SELECT hrd_stack_push_f(‘TEST_VALUE’,100) from dual;

Page 112: 11 i 10 at Form Personalization

Usage Examples: STACK_PUSH

A: begin

HRD_STACK_PUSH(‘CUST_NUM’,123);

end;

B: select HRD_STACK_PUSH_F(‘CUST_NUM’, 123)

from dual;

Page 113: 11 i 10 at Form Personalization

Usage Example: STACK_PULL and STACK_PEEK

A: v_customer := HRD_STACK_PULL(‘CUST_NUM’);

B: select HRD_STACK_PULL(‘CUST_NUM’) from dual;

C: if HRD_STACK_PEEK(‘CUST_NUM’) is not null then

v_customer := HRD_STACK_PULL(‘CUST_NUM’);

end if;

Page 114: 11 i 10 at Form Personalization

Real Demo Experience #5

Page 115: 11 i 10 at Form Personalization

Requirement:If the item cannot be shipped to a specific state (hazardous materials), or if the Rep is not authorized to sell the item, place the line item on hold (and warn user)

Page 116: 11 i 10 at Form Personalization
Page 117: 11 i 10 at Form Personalization
Page 118: 11 i 10 at Form Personalization
Page 119: 11 i 10 at Form Personalization
Page 120: 11 i 10 at Form Personalization
Page 121: 11 i 10 at Form Personalization
Page 122: 11 i 10 at Form Personalization
Page 123: 11 i 10 at Form Personalization

Behind the Scenes:Order Form Personalization

1. WNII @Quantity and Qty is null:A. Check Restrictions

i. Check Restrictions for item and rep, if either exists place line on hold, create attachment (item only)

ii. Get item message into Item message variable

iii. Get rep message into Rep message variable

B. If Item Restriction variable is not null, display returned message, clear item message

C. If Rep Restriction, variable is not null, display returned message, clear rep message

Page 124: 11 i 10 at Form Personalization
Page 125: 11 i 10 at Form Personalization

Two stored procedures hrd_restricted_item and

hrd_restricted_rep checks restrictions, generates

appropriate message text and places order on hold

Stack procedure hrd_stack_push

pushes messages onto stack for later retrieval

Page 126: 11 i 10 at Form Personalization
Page 127: 11 i 10 at Form Personalization
Page 128: 11 i 10 at Form Personalization

HRD_RESTRICTED_ITEM Functioncreate or replace function hrd_restricted_item( … ) return varchar2 as …begin… select count(*) into v_count from MTL_ITEM_CATEGORIES_V where … if v_count <> 0 then v_message := 'Due to EPA Regulations, this item cannot be shipped to the state of '

||v_state||'. This line will be placed on HOLD.'; … hrd_add_attachment( … ); hrd_add_order_hold( … ); end if; return(v_message);end;/

Performance tip: include a‘and rownum = 1’ in WHERE clause

Page 129: 11 i 10 at Form Personalization

Stack procedure hrd_stack_push

pushes messages onto stack for later retrieval

Page 130: 11 i 10 at Form Personalization
Page 131: 11 i 10 at Form Personalization
Page 132: 11 i 10 at Form Personalization
Page 133: 11 i 10 at Form Personalization
Page 134: 11 i 10 at Form Personalization
Page 135: 11 i 10 at Form Personalization
Page 136: 11 i 10 at Form Personalization
Page 137: 11 i 10 at Form Personalization
Page 138: 11 i 10 at Form Personalization
Page 139: 11 i 10 at Form Personalization

Oops……

Restrictions Checks are done as long as the Quantity field is null. What if the item is changed after the quantity has been entered?

Each time user returns to Quantity field (as long as it is blank) the Restrictions Checks are performed (and the messages displayed)

Since the Restrictions Checks add Order Holds and Attachments to the order, multiple Order Holds and multiple Attachments will be created!

Only want check a if new line or item changed!

Page 140: 11 i 10 at Form Personalization

Behind the Scenes:Order Form Personalization - Tweak

1. WNII @Quantity and nvl(ATTRIBUTE11,' ')<>itemA. Check Restrictions

i. Check Restrictions for item and rep, if either exists place line on hold, create attachment (item only)

ii. Get item message

iii. Get rep message

iv. Set ATTRIBUTE11 = item Number *

B. If Item Restriction variable is not null, display returned message, clear item message

C. If Rep Restriction, variable is not null, display returned message, clear rep message

* Objections from the Flexfield Development Team noted.

Page 141: 11 i 10 at Form Personalization
Page 142: 11 i 10 at Form Personalization
Page 143: 11 i 10 at Form Personalization
Page 144: 11 i 10 at Form Personalization

Miscellaneous Stuff

Personalizations are made per function, not form. This means that in MFG and CRM where a few forms can launch with seemingly dozens of different functions, personalizations might need to be replicated. 

Make sure 'Close Other Forms' is unchecked in the Navigator form so the Personalization form doesn't keep closing as you test your changes.

Real numbers should be entered with decimal point as the radix (canonical format), regardless of current NLS settings.

If you hide a Tab page, you may need to change the navigation sequence of items before and after it to prevent it from popping open. 

Use the message type of 'Debug' to help you resolve issues.  The context of 'Industry' is reserved for future use

Page 145: 11 i 10 at Form Personalization

Why a personalization might not run:

The Rule or Action is not enabled The Condition you entered for the Rule has evaluated to FALSE The Trigger Event and/or Trigger Object were not what you expected The scope of the rule only consists of Responsibility, Industry and/or User,

and none is true for the current context. Messages of type Error, or a Warning that the user responds to with ‘No’,

raises form_trigger_failure and stops further processing.) An action is executing the Builtin 'RAISE FORM_TRIGGER_FAILURE'

which will abort all further processing for that event. The Language of the Action is different than what you are currently running You have set Custom Code to ‘Off’ or ‘Core code only’ in the pulldown

menu

Page 146: 11 i 10 at Form Personalization

Final Notes and Thoughts

Review Forms Personalization Documentation and Viewlets

– Users Guide: Metalink note 279034.1– Viewlets and Powerpoints should soon be on the 11.5.10 TOI

Center – AppsTech on Global Exchange, Forms Personalization link

(http://globalxchange.oraclecorp.com/appstech) Test manually and use ‘Show Custom Events’ to

determine what the Form is really doing (maybe not what you think!)

If you ‘break’ a form, turn off Custom Code and fix Form Personalization

The one consistency with Form coding is the inconsistency with Form coding! (especially with ‘CRM’)

Page 147: 11 i 10 at Form Personalization

Final Notes and Thoughts

Forms Personalization =

Demo PersonalizationIf the demo does not utilize Forms

Personalization in some manner, you(or the SCs) are not thinking hard enough!

Page 148: 11 i 10 at Form Personalization

THINK OUTSIDE THE BOX!

Page 149: 11 i 10 at Form Personalization

AQ&Q U E S T I O N SQ U E S T I O N SA N S W E R SA N S W E R S

Page 150: 11 i 10 at Form Personalization
Page 151: 11 i 10 at Form Personalization

The HTML attached in Presenter’s notes for this slide will display the standard icons available in the

‘http://laXXXX.oracleads.com/OA_JAVA/oracle/apps/media/’ directory. (Copy to Notepad , change instance reference in “base href” line to your instance, and save file with a .HTM extension)

Part 1 of 2 (approx 3090 icons)

Page 152: 11 i 10 at Form Personalization

The HTML attached in Presenter’s notes for this slide will display the standard icons available in the

‘http://laXXXX.oracleads.com/OA_JAVA/oracle/apps/media/’ directory. (Copy to Notepad, change instance reference in “base href” line to your instance, and save file with a .HTM extension)

Part 2 of 2 (approx 3090 icons)

Page 153: 11 i 10 at Form Personalization