Professional Documents
Culture Documents
html
Home Technical Articles Training Articles Receive Email for New Articles Contributors Apps Book
RELATED ITEMS
Playing with
CUSTOM.pll
Switch off
CUSTOM.pll
programatically
CUSTOM.pll | Print | E-mail
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 owever, f or example in HR MS, you can also write code in CU STOM.pll to t rap below lilist
st 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
Apps - CUSTOM.pll http://oracle.anilpassi.com/custom.pll-2.html
Home Contact Us
H ow to identif y which t rigger is most suitable for writ ing your business logic?
You can either open the FMB itself, and see the triggers which are calling CUSTOM.pll.
However, there is a easier way to work out the most suitable triggers. You can navigate to Help/Diagnostics/Custom Code/Show Custom Events
Once that radio button has been set, you will see the list of Events Displayed on the screen.
I n some cases, the desired WH EN-NEW-BLOCK-INSTANCE or WH EN-NEW-ITEM-I NSTANCE are no t being fired. What can I do?
It should always be possible to trap these events in CUSTOM.pll . But in some cases, the form might have these triggers at block/field level, with the trigger property
being OVERRIDE. Due to this, the corresponding form level triggers[ to invoke CUSTOM.pll] do not fire. In this case you must raise a bug with Oracle on Metalink.
2 of 10 5/24/2011 1:04 PM
Apps - CUSTOM.pll http://oracle.anilpassi.com/custom.pll-2.html
THEN
IF form_name = 'ARXTWMAI' AND block_name = 'INVOICE_HEADER'
THEN
xx_arxtwmai.default_customer;
ELSIF form_name = 'ARXTWMAI' AND block_name = 'INVOICE_HEADER'
THEN
.....
END IF;
ELSIF event_name = 'WHEN-NEW-BLOCK-INSTANCE'
THEN
.....
END IF ;
2. D efault a value
copy (TO_CHAR (n_person_id),'PERSON_BLOCK.PERSON_ID' );
3 of 10 5/24/2011 1:04 PM
Apps - CUSTOM.pll http://oracle.anilpassi.com/custom.pll-2.html
IF n_button_selection = 1 THEN
xx_call_invoice_print;
ELSE
xx_fax_invoice;
END IF;
10. 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.UPDATE_DEFINITION(
BLOCK => 'BLOCKNAMEHERE'
,FIELD => 'FLEXFIELDNAME'
,ENABLED => 'Y'
,DISPLAYABLE => 1);
END IF ;
As you may have gathered by now, almost any form related task can be done using CUSTOM.pll
Action Type in CU STOM Allowed
Opening SQL Cursors Yes
Executing pl/sql stored procedures Yes
Referencing fields using bind notation like :block.field No
Exception management Yes
Comments (43)
Subscribe to this comment's feed
...
written by balkrishna , April 02, 2007
Excellent Article
i think u can elobrate this topic using some real time example
this will help in great
thnaks
balkrishna
...
written by Anil Passi , April 02, 2007
Cheers Bala
...
written by kumar , April 05, 2007
hi Anil
thanks
...
written by Viral , April 15, 2007
Is it possible to write any other (apart of 6 triggers mentioned in custom.pll) trigger to write in custom.pll. Like PRE-INSERT or PRE-UPDATE. I need
to insert data in a staging table when the data in the form is INSERTED/UPDATED. How can I achieve this?
...
written by Pawan , April 19, 2007
about forms customization.
I have three or four button in forms,
i want to disable one button for particular user,not for senior lable person(like manager)
can u send me the steps for this)
4 of 10 5/24/2011 1:04 PM
Apps - CUSTOM.pll http://oracle.anilpassi.com/custom.pll-2.html
thanks in advance
pawan
...
written by Anil Passi , April 20, 2007
Hi there
You can use forms personalizatiton to achieve this. In the context field, enter the USERNAME for which button needs to be hidden.
In case there are two many users, then my question would be if superuser and lower-level user have differing responsibilities. If so, your context could be
responsibility.
If for some reasons you can not use Forms Personalization, then in CUSTOM.pll, use fnd_global.user_id or fnd_global.employee_id to drive your logic.
Thanks,
Anil
...
written by Datta , April 24, 2007
Hi Anil,
I want to convert forms from Forms 4.5 to Forms 10g, What is the procedure for it?
Will have to convert forms4.5 to forms 6i & then forms 6i to forms 10g? or is there any tool to do it. Please guide?
...
written by Anil Passi , April 25, 2007
Hi Datta
Thanks,
Anil Passi
...
written by srinivasarao , April 29, 2007
hi,
excellent article
...
written by sandeep.yaparla , July 06, 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.
Actually the lov what am chaining is key flex field item lov i want to aching how can i help me out
...
written by Anil Passi , July 06, 2007
Hi Sandeep,
I haven't tried this, and I assume you aren't changing the LOV against the individual segment of KeyFlex.
Anyway, if standard KEY-FLEX API gets called in WHEN-NEW-ITEM-INSTANCE, then it will override your LOV/RG changes.
Thanks,
Anil Passi
...
written by sandeep.yaparla , July 09, 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.
would please give me an example because iam structed in middle i need to finish it asap
please
thanks
regards
sandeep.
...
written by Anil Passi , July 09, 2007
Hi Sandeep
5 of 10 5/24/2011 1:04 PM
Apps - CUSTOM.pll http://oracle.anilpassi.com/custom.pll-2.html
Are you simlpy wanting to filter the values during data entry?
You can also append to the where conditions of a Key Flexfield, a common example is for exclusion of accounts with summary flag
Thanks,
Anil Passi
...
written by sandeep.yaparla , July 10, 2007
Hi anil
thanks
i got it.
regards
sandeep
...
written by k.subbu , July 10, 2007
Dear Anil,
The articles in your website is excellent.It gives an indepth knowledge to anyone.The presentation of the articles is also excellent.
...
written by APassi , July 10, 2007
Hi Subbu
You can put some messages in these form triggers and note down the sequence in which they fire. If I remember it correctly, the sequence is pre-form,
when-new-form, pre-block,-when-new-block, pre-item, when-new-item.
I tried this some 8yrs ago, by putting in messages into these triggers. Please correct this if your findings are any different.
Thanks
Anil Passi
...
written by Ferry , July 13, 2007
Hi Anil,
first of all, thanks so much for this wonderful site, i learnt a lot.
i m thinking to customize the LoV query in Expenditure Type column in AP Invoice Distribution.
currently the Lov showing all the expenditure types, while in fact it should be restricted based on Resource Group defined in Project.
Thanks&Regards,
Ferry
...
written by Anil Passi , July 13, 2007
Hi Ferry
step 1. create a new record group with a query filtering on resource group
step 2. attach that record group to the existing LOV
6 of 10 5/24/2011 1:04 PM
Apps - CUSTOM.pll http://oracle.anilpassi.com/custom.pll-2.html
Thanks
Anil
...
written by kishan , August 16, 2007
Hi,
Can we handle the clear tool from tool bar in custom.pll
Regards
B.kishan kumar
...
written by fnd_key_flex.update_definition , September 02, 2007
Hi Anil,
thanks,
ahmed
10. 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.UPDATE_DEFINITION(
BLOCK => 'BLOCKNAMEHERE'
,FIELD => 'FLEXFIELDNAME'
,ENABLED => 'Y'
,DISPLAYABLE => 1);
END IF ;
...
written by kishankumar , September 05, 2007
Hi,
Iam facing one situtation ,How to trap the clear record event in the custom.pll in PO screen. KEY-DELREC and KEY-CLRREC are captured only in HRMS
module or it can also capture in PO(distribution) module
Regards,
B.kishan kumar
...
written by kishankumar , September 05, 2007
Hi,
Iam facing one situtation ,How to trap the clear record event in the custom.pll in PO screen. KEY-DELREC and KEY-CLRREC are captured only in HRMS
module or it can also capture in PO(distribution) module
Regards,
B.kishan kumar
...
written by Anil Passi , September 05, 2007
Hi BK
Please open your PO form and see if APP_STANDARD.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
Apps - CUSTOM.pll http://oracle.anilpassi.com/custom.pll-2.html
Thanks
Anil passi
apply validations
written by chris , October 12, 2007
Hi anil,
I need to write two custom codes to custom.pll and add a DFF. Details are
1)the oracle user,contractor and preparer should all be employees. in requisition and receipt forms emp name is mandatory. 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. 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.The DFF will have Context value field for employee having LOV of ‘Employee’ and ‘Contractor’ ,if user
selects the value as ‘Contractor’, then supplier field will be prompted ,which is mandatory .
Thanks
chris
I have a requirement to block the master org in the change organization form.
How can i do this using custom.pll.
Thanks and regards,
Srinidhi.
Custom.pll
written by SharmaManu , October 30, 2007
Hi Anil,
I found your site couple of weeks back and I found it very usefull, thanks for all your efforts. If possible please provide an insight.
Question : Requirement is that If ITEM has 0(ZERO) UNIT_PRICE than user should not be able to select it in PO form (POXPOEPO).
I dont want to customize form for this but enable to do it using Custom.pll, I'm able to pop-up message using Form Personalization but still Unit Price field is
editable.
Thanks
Descriptive Flexfiledl
written by Nile MA , November 15, 2007
Hi,
I read your article on Making some segments of a KeyFlexfield Display-Only depending upon some condition.
Similarly, is it possible to make some segments of a Descriptive Flexfield Disabled or ReadOnly. It will be helpful if you assist me.
Thanks,
Nile.
I would like to have the firing sequence of the triggers in the forms 6i.....
Regards,
Mark V.
I have one issue, that is a particular forms retrieves required record when the Help->diagnostics-Custom Code ->Off .
But the same time Help->diagnostics-Custom Code ->Normal, when i move the block its not showing correct records.
Question is Help->diagnostics-Custom Code ->Off in this case what are the code will be disabled.
8 of 10 5/24/2011 1:04 PM
Apps - CUSTOM.pll http://oracle.anilpassi.com/custom.pll-2.html
I have one issue, that is a particular forms retrieves required record when the Help->diagnostics-Custom Code ->Off .
But the same time Help->diagnostics-Custom Code ->Normal, when i move the block its not showing correct records.
Question is Help->diagnostics-Custom Code ->Off in this case what are the code will be disabled. Is it personalization code or custom.pll code or even some
customization code from form trigger
is there any way using form Personalization, I can disable the When-Validate-Item trigger.
...
written by Anil Passi , January 15, 2008
Hi Vivek
THanks,
Anil
How to find responsibility and applicaion_id f or t he current application in the cust om.pll
written by R A M S , February 21, 2008
Hi,
I have a requirement in Purchasing Order form by using Form personalization or Custom.pll, Requirement is as follows
With Best,
Ramprasad K
M U M B A I..
...
written by Anil Passi , March 10, 2008
Hi Adrian
Enable show custom events, and see if WHEN-VALIDATE-RECORD is captured CUSTOM.pll prior to COMMIT taking place.
Thanks,
Anil Passi
9 of 10 5/24/2011 1:04 PM
Apps - CUSTOM.pll http://oracle.anilpassi.com/custom.pll-2.html
...
written by Naveen Sankuratri , March 14, 2008
Hi Anil,
Its good to follow foot steps of Great people.Its not a bad thing to copy good ideas from people like you
Mr.
written by Julius Gonsalves , March 19, 2008
Hi Anil,
All your examples are very useful. I need to open a Custom From by button press of an Oracle Form. At present this button press is opening an Oracle Form.
What are the steps?
Thanks,
Julius
...
written by Julius Gonsalves , March 20, 2008
Hi Anil,
Can we write code in CUSTOM.pll for the event WHEN-BUTTON-PRESSED? At present 'Find' button of eBusiness Center Form (ASTRCALL) is calling
Universal Search Form (ASTLSGEN). I created a Custom Form based on ASTLSGEN.fmb. Now I want 'Find' button of eBusiness Center Form (ASTRCALL)
should call my form instead of Universal Search Form (ASTLSGEN).
Thanks,
Julius
...
written by Anil Passi , March 21, 2008
Hi Julius
I suggest that you hide that button using forms personalization and then create a new tools menu via FP. This new tool menu can call your custom form.
Thanks,
Anil
...
written by Julius Gonsalves , March 21, 2008
Hi Anil,
Julius
You must be logged in to a comment. Please register if you do not have an account yet.
Oracle 9i,10g, 11g Tuning and monitoring with Lab128 - for DBA and DB performance analysts www.lab128.com
1192+ of Oracle Openings Exp: 0 to 13 Yrs.Sal: 25k to 95k PM Apply Now & get Multiple Interviews TimesJobs.com/Oracle_Developer
Oracle 11g DBA Training Best Trainers, Best Place to Work in Indian Training Industry www.Koenig-India.com
10 of 10 5/24/2011 1:04 PM