Monday, June 27, 2016

How to Update Profile Option Value from Backend
 
There is a Standard API fnd_profile.SAVE which can be used to update the Profile Option Value

Below Example is for setting profile option value at User Level.

You can also create a cursor and loop the statement to update multiple level values.

DECLARE
v_profile_option fnd_profile_options.PROFILE_OPTION_NAME%type;
v_value fnd_profile_option_values.PROFILE_OPTION_VALUE%type;
v_level VARCHAR2(4):='USER';
v_user_id NUMBER

BEGIN
v_update :=
         fnd_profile.SAVE (v_profile_option, -- Profile name you are setting
                           v_value, -- Profile value you are setting
                           v_level, -- Level that you're setting at: 'SITE','APPL','RESP','USER', etc.
                          v_user_id ---- Level value that you are setting at, e.g. user id for 'USER' level.
                          );
      COMMIT;
 

END;

No comments:

Post a Comment