8 Replies Latest reply on Jan 23, 2020 1:07 PM by Mohammed Fareed Hussain

    Custom.pll

    Mohammed Fareed Hussain

      Hi Experts,

       

      I have a requirement to make all responsibilities of a user read only using custom.pll.

       

      so far i have achieved the above requirement using the below code in custom.pll

       

      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;

      /

      But know i have a requirement to make these changes for multiple users.By using lookup or value set so that if i want to add another user so that i can go to lookup or value set and add the user name .if it is not then every time i have to download custom.pll and make changes in the code then move to server and compile it.

       

      Experts i need you are help to solve these issue.And which approach is good for the above requirement.

       

       

      thanks and regards,

      Hussain.