Using custom.pll [message #678918] |
Wed, 22 January 2020 06:52 |
|
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 |
cookiemonster
Messages: 13925 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 #678922 is a reply to message #678920] |
Wed, 22 January 2020 07:52 |
cookiemonster
Messages: 13925 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 |
John Watson
Messages: 8938 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 #678927 is a reply to message #678926] |
Wed, 22 January 2020 08:34 |
cookiemonster
Messages: 13925 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.
|
|
|