How can I retrieve a profile option value from an action chain in Oracle Visual Builder Studio?

If the profile option is REST enabled, then you can get the value using the following code: const poVal = await cxcore.services.profileOptions.getProfileValue(profileOptionName). Follow these steps to enable a profile option for REST.

You enable the profile option for REST by adding it to the secure category (ORA_FND_AUTH_REST_ACCESS). This category gives the profile option AUTH access so the value can be retrieved using the REST endpoint.

  1. Open the Setup and Maintenance work area.(Navigator > My Enterprise > Setup and Maintenance)
  2. Click the Tasks drawer icon.

    Screenshot of a part of the Setup and Maintenance page, highlighting the location of the Tasks drawer
  3. In the drawer, click the Search link.
  4. Search for the task Manage Profile Categories and click the link.
  5. In the Manage Profile Categories page, search for the Category CodeORA_FND_AUTH_REST_ACCESS.
  6. In the ORA_FND_AUTH_REST_ACCESS: Profile Options, section, click New (the plus sign).Manage Profile Categories page highlighting the location of the New button for adding a profile option
  7. Search for and select the name of your profile option.
  8. Click Save and Close.
  9. Do a Get to this endpoint: https://<yourserverhost>/fscmRestApi/resources/11.13.18.05/profileValues/PO_ENABLE_RCO_PWA.