global variable in form personalization

53
© 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 Sharpe Susan Behn Solution Beacon, LLC

Upload: saurabh-sonkusare

Post on 10-Apr-2015

5.648 views

Category:

Documents


7 download

TRANSCRIPT

Page 1: Global Variable in Form Personalization

© 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

Page 2: Global Variable in Form Personalization

2© 2005 Solution Beacon, LLC. All Rights Reserved.

Introduction

nSolution Beacon, LLCuTim SharpeuSusan Behn

Page 3: Global Variable in Form Personalization

3© 2005 Solution Beacon, LLC. All Rights Reserved.

nDefinitions/Overview

uExtensions

uCustomizations

nCUSTOM.pll

nForms Personalization – demo

nAdditional Resources

Agenda

Page 4: Global Variable in Form Personalization

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

Page 5: Global Variable in Form Personalization

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”

Page 6: Global Variable in Form 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!

Page 7: Global Variable in Form Personalization

7© 2005 Solution Beacon, LLC. All Rights Reserved.

Overview – Customizations

…THEN TEST IT AGAIN!

Page 8: Global Variable in Form Personalization

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

Page 9: Global Variable in Form Personalization

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

Page 10: Global Variable in Form Personalization

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;

Page 11: Global Variable in Form Personalization

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

Page 12: Global Variable in Form Personalization

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;

Page 13: Global Variable in Form Personalization

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’)

Page 14: Global Variable in Form Personalization

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

Page 15: Global Variable in Form Personalization

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

Page 16: Global Variable in Form Personalization

16© 2005 Solution Beacon, LLC. All Rights Reserved.

Forms Personalization – Access nAccess the form or function needing personalizationnHelp à Diagnostics à Custom Code à Personalize

Page 17: Global Variable in Form Personalization

17© 2005 Solution Beacon, LLC. All Rights Reserved.

Forms Personalization

Page 18: Global Variable in Form 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

Page 19: Global Variable in Form Personalization

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

Page 20: Global Variable in Form Personalization

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

Page 21: Global Variable in Form Personalization

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

Page 22: Global Variable in Form Personalization

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

Page 23: Global Variable in Form Personalization

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

Page 24: Global Variable in Form Personalization

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

Page 25: Global Variable in Form Personalization

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

Page 26: Global Variable in Form Personalization

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

Page 27: Global Variable in Form Personalization

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

Page 28: Global Variable in Form Personalization

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

Page 29: Global Variable in Form Personalization

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

Page 30: Global Variable in Form Personalization

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)

Page 31: Global Variable in Form Personalization

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

Page 32: Global Variable in Form Personalization

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

Page 33: Global Variable in Form Personalization

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

Page 34: Global Variable in Form Personalization

34© 2005 Solution Beacon, LLC. All Rights Reserved.

Forms Personalization –Property Actions Examplen:GLOBAL Variable

nMessage

Page 35: Global Variable in Form Personalization

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

Page 36: Global Variable in Form Personalization

36© 2005 Solution Beacon, LLC. All Rights Reserved.

Forms Personalization –Message ExamplesnDebug message

nTraining reminders

Page 37: Global Variable in Form Personalization

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.

Page 38: Global Variable in Form Personalization

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

Page 39: Global Variable in Form Personalization

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

Page 40: Global Variable in Form Personalization

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

Page 41: Global Variable in Form Personalization

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

Page 42: Global Variable in Form Personalization

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

Page 43: Global Variable in Form Personalization

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

Page 44: Global Variable in Form Personalization

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

Page 45: Global Variable in Form Personalization

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

Page 46: Global Variable in Form Personalization

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

Page 47: Global Variable in Form Personalization

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

Page 48: Global Variable in Form Personalization

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)

Page 49: Global Variable in Form Personalization

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

Page 50: Global Variable in Form Personalization

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

Page 51: Global Variable in Form Personalization

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>

Page 52: Global Variable in Form Personalization

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

Page 53: Global Variable in Form Personalization

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.