Home » Developer & Programmer » Forms » Using custom.pll (Released 12.2.7 )
Using custom.pll [message #678918] Wed, 22 January 2020 06:52 Go to next message
thussain795@gmail.com
Messages: 6
Registered: January 2020
Junior Member
Hi Experts,

I am trying to use custom.pll for making user responsibility read only.
When i am doing these for single user it is working fine.
Below is the code for single user.

formname varchar2(30);
blockname varchar2(30);

begin
IF event_name = 'WHEN-NEW-FORM-INSTANCE' THEN
IF FND_PROFILE.VALUE('USERNAME')='<USER_NAME>' THEN
BEGIN
COPY('Entering app_form.query_only_mode.','global.frd_debug');
COPY('YES', 'PARAMETER.QUERY_ONLY');
APP_MENU2.SET_PROP('FILE.SAVE', ENABLED,PROPERTY_OFF);
APP_MENU2.SET_PROP('FILE.ACCEPT', ENABLED,PROPERTY_OFF);
formname := NAME_IN('system.current_form');
blockname := GET_FORM_PROPERTY(formname, FIRST_BLOCK);
WHILE (blockname is not null) LOOP
IF (GET_BLOCK_PROPERTY(blockname, BASE_TABLE) is not NULL) THEN
SET_BLOCK_PROPERTY(blockname, INSERT_ALLOWED, PROPERTY_FALSE);
SET_BLOCK_PROPERTY(blockname, UPDATE_ALLOWED, PROPERTY_FALSE);
SET_BLOCK_PROPERTY(blockname, DELETE_ALLOWED, PROPERTY_FALSE);
END IF;
blockname := GET_BLOCK_PROPERTY(blockname, NEXTBLOCK);
END LOOP;
END;
END IF;
END IF;
end event;

My requirement is i have to make it work for multiple user using value sets or lookup.

if anyone knows the approach please help.

thanks and regards
Hussain
Re: Using custom.pll [message #678919 is a reply to message #678918] Wed, 22 January 2020 07:27 Go to previous messageGo to next message
cookiemonster
Messages: 13894
Registered: September 2008
Location: Rainy Manchester
Senior Member
So you want to run that block of code for certain users?
So have the list of users in table, query the table for an entry that matches FND_PROFILE.VALUE('USERNAME'), and if there is a match run the code.

Is there something preventing you doing that?
Re: Using custom.pll [message #678920 is a reply to message #678919] Wed, 22 January 2020 07:33 Go to previous messageGo to next message
thussain795@gmail.com
Messages: 6
Registered: January 2020
Junior Member
Can you please provide me detailed information.
i am newbie to these technology.
Re: Using custom.pll [message #678922 is a reply to message #678920] Wed, 22 January 2020 07:52 Go to previous messageGo to next message
cookiemonster
Messages: 13894
Registered: September 2008
Location: Rainy Manchester
Senior Member
Detailed information on what?
creating a table?
inserting data into it?
selecting data back out of it?

These are all very basic to the point where you probably ought to be doing a SQL course if you don't know how.
Re: Using custom.pll [message #678923 is a reply to message #678918] Wed, 22 January 2020 08:00 Go to previous messageGo to next message
John Watson
Messages: 8268
Registered: January 2010
Location: Global Village
Senior Member
Do you have several users with the same responsibility, and you want some of them to be read only and others to be read write? If so, perhaps you need to separate the users into two responsibilities with appropriate privileges. Then you don't have to use custom.pll at all.
Re: Using custom.pll [message #678924 is a reply to message #678922] Wed, 22 January 2020 08:07 Go to previous messageGo to next message
thussain795@gmail.com
Messages: 6
Registered: January 2020
Junior Member
Sorry to say I have said in my message clearly that i need to achieve it by using lookup or values set.i cannot use creating table and comparing.
Re: Using custom.pll [message #678926 is a reply to message #678923] Wed, 22 January 2020 08:13 Go to previous messageGo to next message
thussain795@gmail.com
Messages: 6
Registered: January 2020
Junior Member
thank you Mr.john watson i will try these.
Re: Using custom.pll [message #678927 is a reply to message #678926] Wed, 22 January 2020 08:34 Go to previous message
cookiemonster
Messages: 13894
Registered: September 2008
Location: Rainy Manchester
Senior Member
It appears you are using oracle apps
Forms doesn't just work with oracle apps, and plenty of forms developers, myself included, no nothing about oracle apps.
If your question is about how to interact with apps data structures etc, then you would be better off asking in an apps specific forum.
Previous Topic: problem of message do you want to save changes ... when I press on button that make execute query
Next Topic: read image in oracle reports
Goto Forum:
  


Current Time: Tue May 26 18:49:13 CDT 2020