X

It's All About the Platform.

Using Custom Profile Options For Configuration Values In A Sales Cloud Extension

Richard Bingham
Senior Development Manager

This is another short worked-example of something that we've seen used in customizations and extensions. In this use-case the new functionality requires a reference configuration value (or values) to be set by an administrator. This value is then retrieved in code as required. Examples include integrated system connection information stored as Third Party Application entries under Setup and Maintenance - Topology, and reference data stored as rows in special configuration Custom Objects.

In this simplified example we'll store values for commission rates. We'll then use them in a custom field to display the prospective bonus for the sales person on each lead.

First we setup a new profile using the Manage Profile Options task under Setup and Maintenance. We enter a unique name and ensure the Application and Module values match the intended usage, else the value will always return null. 

In this example we want a static default commission rate, plus the option to add user specific values for our best sales people. As such we configure the profile to support two levels; SITE values that apply for everyone, plus USER values that can supersede them. Once saved we can then get our administrator (or sales manager) to add the actual rates as profile values.  

https://blogs.oracle.com/fadevrel/resource/Profiles/finalProfiles.jpg

Next under Application Composer we add a Potential Bonus custom field to the Sales Lead object. This is a Number Formula field using the following to multiply the Deal Amount field value by the profile value:


def val = nvl(DealAmount,0)
import oracle.apps.fnd.applcore.Profile
def prf = nvl(Profile.get("XX_REWARD_RATES"),0)
def result = val * prf
return result

This Potential Bonus field is then displayed on the Page Layout for users to see, and hopefully motivate them to sell more.

https://blogs.oracle.com/fadevrel/resource/Profiles/finalRESULT.jpg

As you may note from the final value above, it used a reward rate of 0.7 from the USER level (since they are jjefferson), whereas if this was unset then it would have used the default SITE level value of 0.2. If profile values are changed then the new value will be used when the user next logs back in.

Join the discussion

Comments ( 1 )
  • Oliver Steinmeier Monday, May 15, 2017
    Excellent post, Richard!
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.