10926788 global variable in form personalization
TRANSCRIPT
© 2005 Solution Beacon, LLC. All Rights Reserved.
Forms Personalization –New for 11.5.10
Ohio Valley OAUG October 21, 2005
Cincinnati, Ohio
www.solutionbeacon.com
Tim SharpeSusan BehnSolution Beacon, LLC
2© 2005 Solution Beacon, LLC. All Rights Reserved.
Introduction
nSolution Beacon, LLCuTim SharpeuSusan Behn
3© 2005 Solution Beacon, LLC. All Rights Reserved.
nDefinitions/Overview
uExtensions
uCustomizations
nCUSTOM.pll
nForms Personalization – demo
nAdditional Resources
Agenda
4© 2005 Solution Beacon, LLC. All Rights Reserved.
Overview – Extensions nExtensions are defined as additional code or objects added to the E-Business SuiteuA new form created from TEMPLATE.FMBuNew reportsuInterfacesuOther new objects
nForms 6i extensions paper/presentationDeveloping Form Extensions for E-Business Suite Customers
www.solutionbeacon.com/industry_presentations.htm
5© 2005 Solution Beacon, LLC. All Rights Reserved.
Overview – Customizations n Customizations are changes to forms, reports or any
other objects delivered with the E-Business SuitenMethods for customizing applications
uCUSTOM.pll – generally protected during patchingu Forms Personalization – generally protected during
patchinguDirect modification of forms, reports, packages, or
other objects – Not Supported or protected during patching and not recommended
nNew terminology for protected customizations is “Personalization”
6© 2005 Solution Beacon, LLC. All Rights Reserved.
Overview – Customizations
WARNING
Customizations, whether they are protected or non protected, allow you to fundamentally change the behavior of the application. This could interfere with intended functionality.
Use with caution!
TEST! TEST! TEST! TEST! TEST!
7© 2005 Solution Beacon, LLC. All Rights Reserved.
Overview – Customizations
…THEN TEST IT AGAIN!
8© 2005 Solution Beacon, LLC. All Rights Reserved.
nLibrary available in $AU_TOP/resource is modified to provide customizations to Oracle Application forms nUse forms builder 6i to modify package bodynExamples
uHide fields, tabsuMake fields requireduRestrict update or insertuChange prompts, tab labelsuAlter LOVsuCreate zooms and tool bar menu selectionsuValidate and formatuAlmost anything you can do in PL/SQL
nReference: Application Developer Guide – Chapter 28
CUSTOM.pll
9© 2005 Solution Beacon, LLC. All Rights Reserved.
nChallengesuTraditional implementation of customizations in CUSTOM.pll only allows one developer at a time to make modificationsuSize limitations can be an issue uKeeping code modular is difficultuTesting requirements can be significant for subsequent modifications to CUSTOM.pll
CUSTOM.pll – Methodology
10© 2005 Solution Beacon, LLC. All Rights Reserved.
Multi-Developer Solution – Supplier Form Example
nCreate a separate library (.pll) for each form to be customized
CUSTOM.pll – Methodology
PACKAGE XXXXXAPXVDMVX ISProcedure event(event_name VARCHAR2);
END;
Package Spec
Package Body
PACKAGE BODY XXXXXAPXVDMVXISPROCEDURE event (event_name VARCHAR2) IS
BEGINIF event_name = ‘WHEN-NEW-FORM-INSTANCE’ THEN
\*Make the vendor type field required*\APP_ITEM_PROPERTY2.SET_PROPERTY(‘VENDOR_TYPE_DISP’,REQUIRED,PROPERTY_TRUE);
END IF;END event;END XXXXXAPXVDMVX;
11© 2005 Solution Beacon, LLC. All Rights Reserved.
Multi-Developer Solution – Supplier Form Example
nAttach your new library to CUSTOM.pll
CUSTOM.pll – Methodology
Navigator view of CUSTOM.pll
Your new library
12© 2005 Solution Beacon, LLC. All Rights Reserved.
Multi-Developer Solution – Supplier Form Example
nAdd a call to your new library in CUSTOM.pll
CUSTOM.pll – Methodology
Package Body of CUSTOM.pll
Form_name varchar2(30) := name_in(‘system.current_form’);Begin
If form_name = ‘APXVDMVD’ THENxxxxxapxvdmvd.event(event_name);
Elsif form_name = ‘OEXOEORD’ THENxxxxxoexoeord.event(event_name);
end if;end event;
13© 2005 Solution Beacon, LLC. All Rights Reserved.
CUSTOM.pll – More Examples
\*Force Upper Case for Supplier Name*\
APP_ITEM_PROPERTY2.SET_PROPERTY(‘VNDR.VENDOR_NAME_MIR',CASE_RESTRICTION,UPPERCASE);
\* Hide the tax payer id*\
APP_ITEM_PROPERTY2.SET_PROPERTY(‘VNDR.NUM_1099_MIR',DISPLAYED,PROPERTY_OFF)
\*Change the prompt*\
APP_ITEM_PROPERTY2.SET_PROPERTY(‘VNDR. END_DATE_ACTIVE_MIR',PROMPT_TEXT,’Inactive Date’)
14© 2005 Solution Beacon, LLC. All Rights Reserved.
Forms Personalizationn Forms Personalizations declaratively alter the behavior
of FormsnUser must understand Forms and PL/SQL nMost changes traditionally done using CUSTOM.pll can
be accomplished using Forms PersonalizationuMust use CUSTOM.pll to alter LOVsuCUSTOM.pll allows all PL/SQL capabilities, builtinsand SQL.
n Forms Personalizations are effective immediately - no compilingn Forms Personalizations fire prior to CUSTOM.pll for the
same event
15© 2005 Solution Beacon, LLC. All Rights Reserved.
Forms PersonalizationProfile OptionsnToday’s Demo environment – 11.5.10 with CU1 patch applied(Forms Personalization in CU1 changed significantly with CU1 patch)nSet Profile Option Hide Diagnostics menu entry to No
Yes will hide the diagnostics menu.nProfile Option Utilities: Diagnostics – if set to No, apps password is required
16© 2005 Solution Beacon, LLC. All Rights Reserved.
Forms Personalization – Access nAccess the form or function needing personalizationnHelp à Diagnostics à Custom Code à Personalize
17© 2005 Solution Beacon, LLC. All Rights Reserved.
Forms Personalization
18© 2005 Solution Beacon, LLC. All Rights Reserved.
nPersonalization Rule HeaderuSequence
tRules run in sequencetSequence numbers (1-100) are not unique
uDescription – free form entryuLevel – Form or Function (CU1 patch)uDebug mode
tOfftStep-by-Step – shows events impacted by rule (CU1 patch)tShow Debug Messages – shows messages with type = debug
uEnabled – checked
Forms Personalization – Rules
19© 2005 Solution Beacon, LLC. All Rights Reserved.
Trigger Events
nUse generic trigger events available in most forms
nUse specific events unique to the form (with caution)
nFind events using Help àDiagnostics àCustom Code àShow Custom Events
nTrigger Events are not validated from the LOV
Forms Personalization –Conditions Tab
20© 2005 Solution Beacon, LLC. All Rights Reserved.
Trigger Events – Generic to almost all forms
nWHEN-NEW-FORM-INSTANCEuSecurity rulesuNavigation rulesuVisual attributesuAvoid message rules at this level
nWHEN-NEW-BLOCK-INSTANCEuSame as WHEN-NEW-FORM-INSTANCEuMessage rules
nWHEN-NEW-RECORD-INSTANCEuDefault values
Forms Personalization –Conditions Tab
21© 2005 Solution Beacon, LLC. All Rights Reserved.
Trigger Events – Generic to almost all formsnWHEN-NEW-ITEM-INSTANCE
uMessage rulesuDefault values dependent on entry of another item
nWHEN-VALIDATE-RECORDuPopulate hidden fieldsuAdditional validations
n SPECIALnuPopulate tools menu (MENU1-15) (CU1 patch)uPopulate tools menu (SPECIAL 1-15)uPopulate reports menu (SPECIAL 16-30)uPopulate actions menu (SPECIAL 31-45)
Forms Personalization –Conditions Tab
22© 2005 Solution Beacon, LLC. All Rights Reserved.
Trigger Events – Generic to almost all forms
nZOOM – recommend using MENUn or SPECIALn rather than zoomnKEY-Fn
Forms Personalization –Conditions Tab
23© 2005 Solution Beacon, LLC. All Rights Reserved.
Trigger Object
nRequired if LOV is availablenRequires Block Name
uWHEN-NEW-BLOCK-INSTANCEuWHEN-NEW-RECORD-INSTANCEuWHEN-VALIDATE-RECORD
nRequires Block.field nameuWHEN-NEW-ITEM-INSTANCE
nMay be required for other events specific to form
Forms Personalization –Conditions Tab
24© 2005 Solution Beacon, LLC. All Rights Reserved.
Conditions nOptional SQL code fragment to limit scope of rulenReferences bind variables (:block.field)nExamples
uUse to limit scope based on profile option valuesuGL Journal Entry – Remind users to change the period name the first 10 days of the fiscal year
Forms Personalization –Conditions Tab
25© 2005 Solution Beacon, LLC. All Rights Reserved.
Context – who does this rule apply to?nMultiple scope rows are allowednLevel at which the rule will apply
uSite uResponsibilityuUser – Use this for testing rulesuIndustry (For future use)
nValue – choose from LOV
Tip: For initial development, set scope to your user id
Forms Personalization –Conditions Tab
26© 2005 Solution Beacon, LLC. All Rights Reserved.
Forms Personalization –Property Actionsn Sequence
uRules will run in sequenceuSequence number not unique
n TypeuPropertyuMessageuBuilt-inuMenu
nDescriptionn Language – use when changing prompts for a specific
languagen Enabled – checked
27© 2005 Solution Beacon, LLC. All Rights Reserved.
n Property Type FieldsuObject Type
tItem , Window, Block, Tab Page, ParametertRadio Button, View, :GLOBAL Variable, CanvastLOV, Local Variable (CU1 patch)
uTarget Object – LOV will include valid values for most typesuProperty Name – LOV availableuValue
nUse Select by Text button to select the target object by prompt namenUse Get Value button to get the current value
Forms Personalization –Property Actions
28© 2005 Solution Beacon, LLC. All Rights Reserved.
Forms Personalization –Property Stringsn Rules for fields that accept strings
uStart with =tString evaluated at run timetCan use bind variables, operators, etctCan use server side functions without out variablestPrior to CU1 patch, SQL statements starting with =Select require “A” alias (=Select meaning A from fnd_lookups where…_
uDoes not start with =tString is taken as a literal exactly as you type it
29© 2005 Solution Beacon, LLC. All Rights Reserved.
Forms Personalization –Property Actions ExampleForce Upper Case for the Vendor NamenType = PropertynObject Type = ItemnTarget Object = VNDR.VENDOR_NAME_MIRnProperty Name = CASE_RESTRICTIONnValue = UPPERCASE
30© 2005 Solution Beacon, LLC. All Rights Reserved.
Forms Personalization –Property Actions ExampleChange the window titlenType = PropertynObject Type = WindownTarget Object = VENDORnProperty Name = TITLEnValue = Suppliers (Oracle Open World)
31© 2005 Solution Beacon, LLC. All Rights Reserved.
Forms Personalization –Actions ExamplePrevent Insert in the Bank Accounts Tab(require users to do this in Bank setup)nType = PropertynObject Type = BlocknTarget Object = VNDR_USESnProperty Name = INSERT_ALLOWEDnValue = False
32© 2005 Solution Beacon, LLC. All Rights Reserved.
Forms Personalization – Variables
Global VariablesnUsed to pass values between forms nMax length is 255 bytesn Prepend the name of the variable with XX
Local variables nUsed when you need to refer to a variable multiple
timesn Specific to local formnMax length is 4000 bytesn Prepend the name of the variable with XX
33© 2005 Solution Beacon, LLC. All Rights Reserved.
Forms Personalization –Property Actions ExampleSet a global variable to the value of the email address in FND_USERS and display this value in a message
nType = PropertynObject Type = :GLOBAL VariablenTarget Object = XX_USER_EMAILnProperty Name = VALUEnValue = =SELECT Nvl(Email_Address,'NO_EMAIL')
FROM fnd_userWHERE user_id = fnd_global.user_id
34© 2005 Solution Beacon, LLC. All Rights Reserved.
Forms Personalization –Property Actions Examplen:GLOBAL Variable
nMessage
35© 2005 Solution Beacon, LLC. All Rights Reserved.
Forms Personalization –Messages nMessage Type Fields
uMessage TypetShow – Informational MessagetHint – Appear on status bartError – Requires user responsetDebug – Only displays if debug mode is set to Show Debug MessagestWarn – Informational message with caution symbol
uMessage Text nDo not use messages for WHEN-NEW-FORM events
36© 2005 Solution Beacon, LLC. All Rights Reserved.
Forms Personalization –Message ExamplesnDebug message
nTraining reminders
37© 2005 Solution Beacon, LLC. All Rights Reserved.
Forms Personalization –Menu ExampleCreate a menu entry to submit payment history reportnType = Menu (Prior to CU1 patch, Type = Special)nMenu Entry = MENU1 – MENU15 or SPECIAL1-45nMenu Label = Supplier Payment HistorynIcon = nullnEnabled in Blocks = VNDR, SITE
uSeparate by commauUse Add Block Button to choose blocksnNote – this action only displays the menu entry.
38© 2005 Solution Beacon, LLC. All Rights Reserved.
Forms Personalization –Built-ins ExampleActivate the menu entry to execute the concurrent request Supplier Payment HistorynTrigger Event = MENU1
39© 2005 Solution Beacon, LLC. All Rights Reserved.
Forms Personalization –Built-ins ExampleActivate the menu entry to run Supplier Payment History ReportnType = BuiltinnBuiltin Type = Launch SRS Form (CU1 patch)nProgram Name = Supplier Payment History
nNote: Parameters are not automatically passed
40© 2005 Solution Beacon, LLC. All Rights Reserved.
Forms Personalization –Built-ins ExampleSupplier Payment History Report – Passing ParametersnCreate a new rule with a sequence before menu executenTrigger event = MENUn or SPECIALn
nSet :GLOBAL variable to value of parameters for report
41© 2005 Solution Beacon, LLC. All Rights Reserved.
Forms Personalization –Built-insSupplier Payment History Report – Passing ParametersnCreate a new rule for the Requests: Submit form
Different syntax required
42© 2005 Solution Beacon, LLC. All Rights Reserved.
Forms Personalization –Built-ins ExampleOpen a url nTrigger Event = WHEN-NEW-FORM-INSTANCEnEstablish menu entry
nTrigger Event = MENU2
CU1 Patch
43© 2005 Solution Beacon, LLC. All Rights Reserved.
Launch a function (CU1 patch) to view payment history formnEstablish the Menu entry
uTrigger Event = WHEN-NEW-FORM-INSTANCEuAction Type = MenuuMENU3 = Payment History
Forms Personalization –Built-ins Example
44© 2005 Solution Beacon, LLC. All Rights Reserved.
Launch a function to view payment history formnTrigger Event = MENU3nSet the :GLOBAL VariablenLaunch a Function
Forms Personalization –Built-ins Example
45© 2005 Solution Beacon, LLC. All Rights Reserved.
Launch a function – target function rulesnPopulate query find variable if the global variable is not nulluTrigger Event = WHEN-NEW-ITEM-INSTANCEuTrigger Object = use the first item on the form
Forms Personalization –Built-ins Example
46© 2005 Solution Beacon, LLC. All Rights Reserved.
Launch a function – target function rulesnPopulate query find variable if the global variable is not nulluTrigger Event = WHEN-NEW-BLOCK-INSTANCEuAction Type = Property
Forms Personalization –Built-ins Example
CU1 Patch
47© 2005 Solution Beacon, LLC. All Rights Reserved.
Launch a function – target function rulesnExecute the DO_KEY(‘NEXT_BLOCK’) built in to force query executionuTrigger Event = WHEN-NEW-BLOCK-INSTANCEuAction Type = Builtin
Forms Personalization –Built-ins Example
48© 2005 Solution Beacon, LLC. All Rights Reserved.
Forms Personalization –Built-insOther Builtins
nGO_BLOCK
nGO_ITEM
nRAISE_FORM_TRIGGER_FAILURE
nFORMS_DDL
nEXECUTE_TRIGGER (CU1 patch)
nSYNCHRONIZE (CU1 patch)
49© 2005 Solution Beacon, LLC. All Rights Reserved.
Forms Personalization – Tips n If you disable a tab page, make sure the user cannot
still navigate to the items on the tab pagen You may need to exit and re-open the form to see
personalization changesnUse Help à Diagnostics à Custom à Show Custom
Events to determine what events are firingn See MetaLink note 279034.1 for special rules for forms
with foldersn After upgrades, go to the personalization for each
form and choose Tools à Validate All nUse debug message before and after eventsn Initialize global variables to null in the navigator form
using the WHEN-FORM-NAVIGATE trigger event
50© 2005 Solution Beacon, LLC. All Rights Reserved.
Forms Personalization – Tips nUse the Validate button to validate strings
uConditions will return true, false or erroruValues will return the resulting string or an error
nUse the Apply Now button to apply the action now and see the results (does not always work if dependant on the results of another action)nUse the Insert ‘Get’ Expression button to get any
property of an item (CU1 patch)n Turn custom code off to confirm any form problem is
due to custom code Help à Diagnostics à Custom Code à Off
n Set global values to null in the navigator form using the WHEN-FORM-NAVIGATE trigger
51© 2005 Solution Beacon, LLC. All Rights Reserved.
Forms Personalization –Moving to another instancen Download for a specific form:FNDLOAD <userid>/<password> 0 Y DOWNLOAD
$FND_TOP/patch/115/import/affrmcus.lct <filename.ldt> FND_FORM_CUSTOM_RULES form_name=<form name>
n Download all personalizationsFNDLOAD <userid>/<password> 0 Y DOWNLOAD
$FND_TOP/patch/115/import/affrmcus.lct <filename.ldt> FND_FORM_CUSTOM_RULES
n UploadFNDLOAD <userid>/<password> 0 Y UPLOAD
$FND_TOP/patch/115/import/affrmcus.lct <filename.ldt>
52© 2005 Solution Beacon, LLC. All Rights Reserved.
nOracle Applications User Interface Standards for Forms-Based Products
nOracle Applications Developer’s Guide
nOracle Applications System Administrator’s Guide
nOracle Applications User Guide
nMetaLink note 279034.1 – Forms Personalization
nwww.solutionbeacon.com – newsletters, free tools, white papers and presentations, Vision access
Other Sources of Information
53© 2005 Solution Beacon, LLC. All Rights Reserved.
Thank you!
If you have any questions or comments please contact:
Tim Sharp [email protected] Behn [email protected]
For free Release 11i Tools and helpful information, please visit our website at:
www.solutionbeacon.com
Real Solutions for the Real World.