My Oracle HRMS Experiences!

Wednesday, March 24, 2010

Custom.pll example to make DFF read only

11:42 PM Posted by Mohammed Abdur Rahman 2 comments
Custom.pll can be used for a wide range of customizations. For example, it can be used to make the DFF read only based on a condition(s). In this example, I will do a customization wherein the Additional Absence Details DFF will be read only for the responsibilities ‘Vision HR Manager' and 'XYZ HR Manager' and for others it will be editable.

Before the customization, the DFF was editable for the above mentioned responsibilities.



Open custom.pll and add the following code:

/* *************************** Code to make DFF Read Only ****************** */

IF (event_name = 'WHEN-NEW-BLOCK-INSTANCE' AND form_name = 'PERWSEAD' AND block_name = 'ABA') THEN
IF (FND_PROFILE.VALUE('RESP_NAME')IN ('Vision HR Manager' ,'XYZ HR Manager')) THEN
fnd_descr_flex.update_definition
(
BLOCK => 'ABA'
,FIELD => 'DF'
,READ_ONLY => 'Y' );
END IF;
END IF;
/* *************************** End of The Code ************************* */

Compile and generate the .plx file.

As custom.pll is loaded every time we login to the applications, we need to logout to see the changes. This is mandatory. Once it’s compiled successfully and the .plx file is generated, the DFF will be read only for the above mentioned responsibilities.



This is only a small example of custom.pll. It can perform much more complex requirements :-)

2 comments:

Gursimran Singh said...


Your way of making a dff read only seems to be happening but how we can it read only field in universal manner through custom.pll

Please answer

Regards
Gursimran

Gursimran Singh said...

i have gone through many materials we can make a dff read only also through security rule,custom.pll as mentioned but i guess it is for specific responsibilities can we make it for all responsibilities

Also can't we do with forms personalization at first place.