This action might not be possible to undo. Are you sure you want to continue?
Receive Email for New Articles
Home Technical Articles Financials HR and Payroll Oracle Workflows Oracle Scripts Installation Fusion Training Articles Receive Email for New Articles Contributors Apps Book
Calendars, messaging, email & more. Try Google Apps for Your Domain.
Online General Ledger Sign Up Free! Web Based Accounting & Powerful Reporting Software. Budget Portlets Get Customized Portlet Development Save on Portlet Building Costs
This website has now moved to
Playing with CUSTOM.pll Switch off CUSTOM.pll programatically CUSTOM.pll Best Practice CUSTOM.pll versus Forms Personalization
Written by Anil Passi Sunday, 01 April 2007 CUSTOM.pll is used to add extensions to Oracle's form Functionality. Some of the common scenario where CUSTOM.pll can be used are:1. Enabling/Disabling the fields 2. Changing the List of Values in a LOV field at runtime. 3. Defaulting values 4. Additional record level validations 5. Navigation to other screens. 6. Enabling Special Menu
| Print |
Primarily there are t wo methods of ext ending Oracle Forms, and t hese are CUSTOM.pll FORMS Personalizations In this article we will cover the basics of using CUSTOM.pll for extending Oracle Forms
H ow and why does CU STOM.pll work? Every form in Oracle Apps is created using something called as TEMPLATE.fmb. But some of the modules like HRMS have their own HR Specific Templates[HRTEMPLT.fmb]. These template files have form level triggers that make call to CUSTOM.pll. The triggers that can be trapped using CUSTOM.pll in HRMS screen can be different than those which can be trapped for other modules.
Commonly used events that are trapped using CU STOM.pll are:ZOOM WHEN-NEW-FORM-INSTANCE WHEN-NEW-BLOCK-INSTANCE WHEN-NEW-RECORD-INSTANCE WHEN-NEW-ITEM-INSTANCE WHEN-VALIDATE-RECORD
list H owever, f or example in HR MS, you can also write code in CU STOM.pll to t rap below list ed event s :PRE-DELETE and POST-DELETE PRE-UPDATE and POST-UPDATE PRE-INSERT and POST-INSERT POST-FORMS-COMMIT WHEN-CREATE-RECORD KEY-DELREC
1 of 10
5/24/2011 1:04 PM
html Home Contact Us COPYRIGHT : This work is licensed under a Creative Commons Attribution-NonCommercial 2. with the trigger property being OVERRIDE. The content on this site is copyright protected. you will see the list of Events Displayed on the screen. In this case you must raise a bug with Oracle on Metalink. the form might have these triggers at block/field level. H ow to identif y which t rigger is most suitable for writ ing your business logic? You can either open the FMB itself.pll.pll] do not fire. there is a easier way to work out the most suitable triggers. However. the corresponding form level triggers[ to invoke CUSTOM.anilpassi. What can I do? It should always be possible to trap these events in CUSTOM.5 License.com/custom. and see the triggers which are calling CUSTOM.pll .pll IF event_name = 'WHEN-NEW-FORM-INSTANCE' 2 of 10 5/24/2011 1:04 PM . You can navigate to Help/Diagnostics/Custom Code/Show Custom Events Once that radio button has been set. the desired WH EN-NEW-BLOCK-INSTANCE or WH EN-NEW-ITEM-I NSTANCE are no t being fired.Apps .pll-2.pll http://oracle. Due to this. I n some cases.CUSTOM. Structure code code in CUSTOM. But in some cases.
SPECIAL15'). 2.label. END filter_customers_in_lov. Enable or Disable Special Menu PROCEDURE manage_special_menu IS mi_id menuitem. lov. ELSIF event_name = 'WHEN-NEW-BLOCK-INSTANCE' THEN . ''. 3 of 10 5/24/2011 1:04 PM .group_name) = 'EXISTING_GROUP_NAME_HERE' THEN set_lov_property(v_customer_lov.default_customer. n_button_selection INTEGER.'XX_CUSTOMER_GROUP'). END IF.Apps .question('Email Invoice'.anilpassi. 3.pll-2..CUSTOM. 1. Similarly you can enable or disable the fields too.group_name.. 7. Ask user a quest ion. 8. END IF. 2. D efault a value copy (TO_CHAR (n_person_id). IF name_in('system.cursor_block') = 'INVOICE_HEADER' THEN app_special2.email_supplier. 4.'PERSON_BLOCK. fnd_message.CLEAR. fnd_message.'select . 6. enabled. property_true)... v_token_value). 5. NUMBER. n_button_selection := fnd_message..required.pll can be used 1.set_name('APPL_SHORT_NAME_HERE'. END IF. set_menu_item_property(mi_id.FIELD'.XXFIELD_NAME'. n_temp_id v_customer_lov BEGIN v_customer_group_id := create_group_from_query('XX_CUSTOMER_GROUP' . END IF. 'question').set_property ('XXBLOCK_NAME. END IF. IF get_lov_property(v_customer_lov.com/custom. END IF. VARCHAR2(1000).. and take appropriat e action v_token_value BEGIN fnd_message. Make a field mandat ory app_item_property2. Lets take some scenario's where CU STOM.'New Label'). property_true). from hz_cust_accounts where . or fnd_message.set_property ('BLOCK. IF form_name = 'SUPPLIER_FORM' THEN xx_supplier_form. 'MSG_NAME_HERE').. ELSE set_menu_item_property(mi_id. set_menu_item_property(mi_id.process_printing. 'Fax Invoice'. displayed. ELSIF form_name = 'ARXTWMAI' AND block_name = 'INVOICE_HEADER' THEN .set_token('XXTOKEN1'.set_string('message text').error or fnd_message.. H andle the click on Special Menu IF event_name = 'SPECIAL15' THEN IF form_name = 'INVOICE_FORM' THEN xx_invoice_form. Change t he label of a field app_item_property2. 'MESSAGE').instantiate('SPECIAL15'. END manage_special_menu. Alt er t he SQL for LOV Query PROCEDURE filter_customers_in_lov IS v_customer_group_id recordgroup. END IF . 'Print Invoice'). displayed. for example FND_MESSAGE.'). BEGIN mi_id := find_menu_item('SPECIAL.PERSON_ID' ).. n_temp_id := populate_group(v_customer_group_id). fnd_message...warn or fnd_message.your custom criteria here. v_customer_lov := find_lov('EXISTING_LOV_NAME_HERE'). You can display messages.html THEN IF form_name = 'ARXTWMAI' AND block_name = 'INVOICE_HEADER' THEN xx_arxtwmai.pll http://oracle.. property_false).set_name('APPL'.property_true).
com/custom..pll. 2007 Is it possible to write any other (apart of 6 triggers mentioned in custom.UPDATE_DEFINITION( BLOCK => 'BLOCKNAMEHERE' ..pll) trigger to write in custom. written by Anil Passi .other_params => 'P_INVOICE_ID = "' || n_invoice_header_id || '"' 10. ELSE xx_fax_invoice.pll-2.open_flag .CUSTOM.session_flag . 2007 hi Anil If you can organize this site .html IF n_button_selection = 1 THEN xx_call_invoice_print.not for senior lable person(like manager) can u send me the steps for this) 4 of 10 5/24/2011 1:04 PM .pll. please visit Best Practices for Development on CUSTOM. April 15. END IF. written by balkrishna . I need to insert data in a staging table when the data in the form is INSERTED/UPDATED. I have three or four button in forms..anilpassi.. April 02. April 19.. Make some segments of a KeyFlexfield Display-Only depending upon some condition For example to make 1st segment of a KFF display-only. we can use IF v_check_result='xyz' THEN FND_KEY_FLEX. Like PRE-INSERT or PRE-UPDATE.. END IF .. Call Anot her form f unct ion fnd_function. 2007 Excellent Article i think u can elobrate this topic using some real time example this will help in great thnaks balkrishna .EXECUTE( function_name => 'XX_FORM_FUNCTION_NAME_HERE' . April 05. .. written by Viral .pll Playing with CUSTOM. almost any form related task can be done using CUSTOM.. 2007 Cheers Bala .Apps . 9. How can I achieve this? .FIELD => 'FLEXFIELDNAME' .DISPLAYABLE => 1). written by kumar .field No Exception management Yes For additional reading on CU STOM.pll http://oracle.activate_flag => 'Y' => 'SESSION' => 'Y'). i want to disable one button for particular user.. 2007 about forms customization.pll Action Type in CU STOM Opening SQL Cursors Executing pl/sql stored procedures Allowed Yes Yes Referencing fields using bind notation like :block. As you may have gathered by now. April 02. written by Pawan ...that will be really great thanks .pll Comments (43) Subscribe to this comment's feed .ENABLED => 'Y' .
In the context field.user_id or fnd_global. written by Anil Passi . written by Anil Passi . 2007 Hi Sandeep Usually you never alter the KFF using personalization or CUSTOM.. Anil Passi .5-->6. April 25. July 09.com/custom. What is the procedure for it? Will have to convert forms4. I want to convert forms from Forms 4.yaparla . would please give me an example because iam structed in middle i need to finish it asap please thanks regards sandeep. Anyway. 2007 hi The document what your given is very good Actually i have one problem i need to display lov values based on my record group For this i created one record group programmatically and i attached this group to lov and I attached this lov to my item when i run it ‘s showing the old values. 2007 ya anil Thanks for your reply but i tried to override the kff lov with my lov for perticular item but its not showing its's displaying the old values. July 06. I haven't tried this.. then 4..pll... written by sandeep. 2007 Hi Anil. if standard KEY-FLEX API gets called in WHEN-NEW-ITEM-INSTANCE.. Please guide? . written by srinivasarao .5-->6. 2007 Hi there You can use forms personalizatiton to achieve this.5 to Forms 10g. Thanks. If so. .. July 09. Anil .. Anil Passi . enter the USERNAME for which button needs to be hidden. 2007 hi. If for some reasons you can not use Forms Personalization. written by Anil Passi .pll 5 of 10 5/24/2011 1:04 PM .. In case there are two many users. Try to get your code to execute in WHEN-NEW-ITEM-INSTANCE Thanks. then my question would be if superuser and lower-level user have differing responsibilities. April 20. Thanks.pll-2.anilpassi.5 to forms 6i & then forms 6i to forms 10g? or is there any tool to do it. written by sandeep. April 24.yaparla . try 4.CUSTOM.0-->9g-->10g will certainly work. your context could be responsibility.employee_id to drive your logic. 2007 Hi Datta Yes.0-->10g route If that does not work... July 06.. excellent article . written by Datta . use fnd_global. April 29. then it will override your LOV/RG changes.html thanks in advance pawan . written by Anil Passi . Actually the lov what am chaining is key flex field item lov i want to aching how can i help me out .pll http://oracle... and I assume you aren't changing the LOV against the individual segment of KeyFlex.Apps . then in CUSTOM. 2007 Hi Sandeep...
regards sandeep .code => 'GL#' . 2007 Dear Anil. thanks so much for this wonderful site.The presentation of the articles is also excellent. July 10. written by sandeep. currently the Lov showing all the expenditure types. pre-block. the sequence is pre-form. 2007 Hi Ferry Sure you can use CUSTOM. i learnt a lot. first of all. Ferry . If I remember it correctly. when-new-item. July 13.where_clause => 'summary_flag != ''Y'' and ENABLED_FLAG =''Y'' and detail_post ing_allowed_flag = ''Y''').field => 'Your KFF Field Name' . subbu .com/custom.define(BLOCK => 'YOUR BLOCK NAME' . pre-item.. 2007 Hi anil thanks i got it. written by Ferry . 2007 Hi Anil.. create a new record group with a query filtering on resource group step 2... July 10.appl_short_name => 'SQLGL' . Thanks. I am looking forward for some more articles like this.. written by k..num => v_chart_of_accts . by putting in messages into these triggers. July 10.Apps .pll-2. written by Anil Passi .id => 'GL_CODE_COMBINATION_ID' . i m thinking to customize the LoV query in Expenditure Type column in AP Invoice Distribution. while in fact it should be restricted based on Resource Group defined in Project. I tried this some 8yrs ago..pll??? Thanks&Regards.pll http://oracle.It gives an indepth knowledge to anyone. when-new-form. can i do this thru custom. Thanks & Regards. Please correct this if your findings are any different.. July 13. Thanks Anil Passi ..-when-new-block.anilpassi.pll But this can also be achieved using forms personalization FP step 1. a common example is for exclusion of accounts with summary flag fnd_key_flex..displayable => 'ALL' . 2007 Hi Subbu You can put some messages in these form triggers and note down the sequence in which they fire.subbu . attach that record group to the existing LOV 6 of 10 5/24/2011 1:04 PM . The articles in your website is excellent.description => 'ACCOUNT_FLEX_DESC' ing_allowed_flag .CUSTOM. i want form fire trigger sequence in oracle forms please send ASAp. Anil Passi .html Are you simlpy wanting to filter the values during data entry? You can also append to the where conditions of a Key Flexfield.yaparla . written by APassi .
Apps . September 05. written by kishan ..How to trap the clear record event in the custom. 2007 Hi BK Please open your PO form and see if APP_STANDARD.How to trap the clear record event in the custom..pll http://oracle.. 2007 Hi.. September 05.kishan kumar . written by fnd_key_flex.update_definition .EVENT is getting called from the desired trigger at FORM Level Also.. use examine to see if any other alternate trigger/event combination may be used 7 of 10 5/24/2011 1:04 PM . 2007 Hi.anilpassi.html Both these steps are possible via FP Thanks Anil .UPDATE_DEFINITION( BLOCK => 'BLOCKNAMEHERE' .. we can use IF v_check_result='xyz' THEN FND_KEY_FLEX.pll Regards B. August 16.pll in PO screen. September 02. ahmed 10. . END IF . written by kishankumar .FIELD => 'FLEXFIELDNAME' .pll-2. Iam facing one situtation .pll in PO screen.ENABLED => 'Y' . Can we handle the clear tool from tool bar in custom. written by kishankumar .. written by Anil Passi . copied below: . Iam facing one situtation .FIELD => 'FLEXFIELDNAME' what do we need to put here? for instance what could be FIELD when the flexfield is 'system items'? can we know this using the 'help->diagnostic->??' thanks. B.DISPLAYABLE => 1). KEY-DELREC and KEY-CLRREC are captured only in HRMS module or it can also capture in PO(distribution) module Regards.. B. 2007 Hi Anil. 2007 Hi..CUSTOM..kishan kumar .kishan kumar . Make some segments of a KeyFlexfield Display-Only depending upon some condition For example to make 1st segment of a KFF display-only. KEY-DELREC and KEY-CLRREC are captured only in HRMS module or it can also capture in PO(distribution) module Regards. i need some help on the point 10 on this document. September 05.com/custom.
2007 Hi to all.. 2008 Hi Anil. using set_menu_it em_property written by Sangram . I have a requirement to block the master org in the change organization form. January 03. January 08. But the same time Help->diagnostics-Custom Code ->Normal. that is a particular forms retrieves required record when the Help->diagnostics-Custom Code ->Off . thanks for all your efforts. Thanks chris Master org to blocked written by srinidhi goud . October 30. Question : Requirement is that If ITEM has 0(ZERO) UNIT_PRICE than user should not be able to select it in PO form (POXPOEPO).. 2007 Hi anil. I found your site couple of weeks back and I found it very usefull. Firing Sequence of the Triggers in Forms 6i. Such a wonderful site. Details are 1)the oracle user.pll. Nile. If they are same then the validation should not allow to save transaction if a) ora user/preparer has entered supp to whom preparer/user belong to and b)if user has entered receipt against PO having supp same as user associated supp. I read your article on Making some segments of a KeyFlexfield Display-Only depending upon some condition.. when i move the block its not showing correct records.anilpassi. Question is Help->diagnostics-Custom Code ->Off in this case what are the code will be disabled.. then supplier field will be prompted . written by Mark Valentine .if user selects the value as ‘Contractor’. Thanks and regards. I'm able to pop-up message using Form Personalization but still Unit Price field is editable. I need to write two custom codes to custom.com/custom. October 12..The DFF will have Context value field for employee having LOV of ‘Employee’ and ‘Contractor’ . is it possible to make some segments of a Descriptive Flexfield Disabled or ReadOnly. Mark V. Srinidhi. Similarly. You have Anil Passi. Help->diagnost ics-Custom Code ->Off 8 of 10 5/24/2011 1:04 PM . I would like to have the firing sequence of the triggers in the forms 6i. First i want to thank you for posting valuable technical/functional solutions.. Regards.pll http://oracle.Apps . Thanks Descriptive Flexfiledl written by Nile MA . How can i do this using custom. 2007 Hi Anil. October 30.html Thanks Anil passi apply validations written by chris ..pll.CUSTOM. 2007 Hi anil.pll-2.. I have one issue. the two validations needs to such that supp name associated with contractor should not be same as the suppname entered in requisition form and receipt form. 2007 Hi. November 15..which is mandatory . Thanks. 2008 Is there any way of using set_menu_item_property in forms personalization? Help->diagnost ics-Custom Code ->Off written by Velmurugan .pll and add a DFF. It will be helpful if you assist me... I dont want to customize form for this but enable to do it using Custom.contractor and preparer should all be employees. in requisition and receipt forms emp name is mandatory. Custom.. If possible please provide an insight.pll written by SharmaManu . November 26.
2008 Hi is there any way using form Personalization. when i press the commit button. 2008 Hi.pll written by Adrian . Thanxs It's URGENT!!! sorry my english!!!!!!! thanxs again. But if the item is in valid. But the same time Help->diagnostics-Custom Code ->Normal. Po Num(segment1 column) should be enabled (its done. how to overcome this limitation? Thanks. Anil change record group for lov in PO approve f orward_to it em written by Alexandar ..pll-2.. How to find responsibility and applicaion_id f or t he current application in the cust om. when WVI will not be fired. But why would you ever want to stop standard validation doe by Oracle's form? This can cause data corruption if not analysed properly. THanks.pll written by R A M S .pll written by Adrian . using custom.fmb from release 12).anilpassi. March 10. Thanks.Apps . January 14. I dont remember the exact syntax though.html written by Velmurugan . I have a requirement in Purchasing Order form by using Form personalization or Custom.pll code or even some customization code from form trigger Disable When-Validat e-it em t rigger written by Vivek Kumr .com/custom. 2008 I need to do this: I need to do a validation in a standart form (OEXOEORD.approval_path_id can not be used in record group.pll. For example BBC(where BBC is British Brod Corporation) Problems using Cust om. when i press the commit button. when i move the block its not showing correct records.pll http://oracle. With Best. First i want to thank you for posting valuable technical/functional solutions. using custom. I discovered that bind variable :po_approve. 2008 Hi Vivek You can use set item property item_is_valid = true. .. and see if WHEN-VALIDATE-RECORD is captured CUSTOM. 2008 Hi Anil. Is it personalization code or custom.pll. Problems using Cust om. that is a particular forms retrieves required record when the Help->diagnostics-Custom Code ->Off . January 17. January 08.. Thanxs It's URGENT!!! sorry my english!!!!!!! thanxs again. 2008 Hi. written by Anil Passi . I have one issue.fmb from release 12). I can disable the When-Validate-Item trigger. Requirement is as follows 1.pll prior to COMMIT taking place.. written by Anil Passi . Thanks in advance for your valuable suggestions. February 21. no issue abt it) 2. Po number will be populated on our own sequences along with resp_name (first 3 letters) by concatanated with resp_name. Ramprasad K M U M B A I.pll. 2008 I need to do this: I need to do a validation in a standart form (OEXOEORD. 2008 Hi Adrian Enable show custom events. January 15. Question is Help->diagnostics-Custom Code ->Off in this case what are the code will be disabled. . March 10. Anil Passi 9 of 10 5/24/2011 1:04 PM . March 10.CUSTOM.
Oracle 9i. All your examples are very useful.fmb.anilpassi. At present this button press is opening an Oracle Form. Julius ... 11g Tuning and monitoring with Lab128 .for DBA and DB performance analysts www.Sal: 25k to 95k PM Apply Now & get Multiple Interviews Oracle 11g DBA Training Best Trainers..pll will not work for WHEN-BUTTON-PRESSED event of an Apps form? Julius You must be logged in to a comment.Apps .com/custom..pll for the event WHEN-BUTTON-PRESSED? At present 'Find' button of eBusiness Center Form (ASTRCALL) is calling Universal Search Form (ASTLSGEN). Many thanks for your quick respond..com/Oracle_Developer 1192+ of Oracle Openings Exp: 0 to 13 Yrs.. March 14.Its not a bad thing to copy good ideas from people like you Mr. What are the steps? Thanks. Its good to follow foot steps of Great people.. what are the steps? Thanks. Thanks. written by Julius Gonsalves . Can it be done by Form Personalization? How? If we need to use CUSTOM. March 19.html .10g. Can we write code in CUSTOM. written by Julius Gonsalves .. I need to open a Custom From by button press of an Oracle Form. 2008 Hi Anil.pll-2. March 21.pll http://oracle. March 20. I created a Custom Form based on ASTLSGEN.Koenig-India. 2008 Hi Anil. That means FP or CUSTOM. written by Anil Passi .CUSTOM.lab128. This new tool menu can call your custom form. Julius . Now I want 'Find' button of eBusiness Center Form (ASTRCALL) should call my form instead of Universal Search Form (ASTLSGEN). 2008 Hi Julius I suggest that you hide that button using forms personalization and then create a new tools menu via FP.pll for this. Anil . Best Place to Work in Indian Training Industry www. written by Naveen Sankuratri . 2008 Hi Anil.com TimesJobs. March 21. Please register if you do not have an account yet. 2008 Hi Anil.com 10 of 10 5/24/2011 1:04 PM . written by Julius Gonsalves .