Thursday, February 18, 2010

Changing Profile options from Backend

The table fnd_profile_options_tl, profile options names are kept.  Now find the corresponding the Profile option name for which you need to update from backend. For this example I took my favorite “ORG_ID”
SELECT profile_option_name
  FROM fnd_profile_options_tl
 WHERE user_profile_option_name LIKE 'MO%'

It returns more than one row but i can make out that "ORG_ID" is the PROFILE_OPTION_NAME for MO: Operating Unit. Now I need to know the Org_ID of the Org whose value is to be set in MO: Operating Unit. SO I use the simple select as below
SELECT organization_id, NAME
  FROM hr_all_organization_units;

From the organization name I find the one which will be the default Operating Unit, and I note the ID. In my case the ID for my default Operating Unit is 286. Now with the code below I set the profile option value using

   stat   BOOLEAN;
   stat := fnd_profile.SAVE ('ORG_ID', 286, 'SITE');
   IF stat
      DBMS_OUTPUT.put_line ('Stat = TRUE - profile updated');
      DBMS_OUTPUT.put_line ('Stat = FALSE - profile NOT updated');
   END IF;

0 Responses to “Changing Profile options from Backend”

Post a Comment


The ideas, thoughts and concepts expressed here are my own. They, in no way reflect those of my employer or any other organization/client that I am associated. The articles presented doesn't imply to any particular organization or client and are meant only for knowledge Sharing purpose. The articles can't be reproduced or copied without the Owner's knowledge or permission.