+ Start a Discussion
penchala rajupenchala raju 

What is hierarchy custom setting

NagaNaga (Salesforce Developers) 
Hi Raju,

Hierarchy settings allow you to personalize your application for different profiles and/or users. The interface has baked-in logic that drills down into the org, profile, and user level (based upon the current user) and returns the most specific or lowest value in the hierarchy. I've found hierarchy custom settings to be extremely useful for those "one off" occasions. Let's suppose you want to authorize your sales teams to be able to offer a specific discount to customers. You might set up an org-wide custom setting of a 1% discount that everyone is authorized to offer. Now of course you have a set of high-producing sales people that are in their own profile and are able to offer a 5% discount. However (and here is the "one off"), there is that one sales person in that same profile that has lobbied the VP of Sales to be able to offer a 15% discount. With hierarchy custom settings you can accommodate all of these scenarios!!

As with list custom settings, when you create a new hierarchy custom setting, the platform creates a custom object in the background for you (notice the API Name field). You then add additional fields to the custom setting in the same manner that you do for custom objects (you are limited to checkbox, currency, date, date/time, email, number, percent, phone, text, text area and URL fields). I found the management interface for custom settings a little confusing at first and got lost a number of times trying to add fields and/or data.

Please follow the below Jeff douglas link for more info

http://blog.jeffdouglas.com/2010/02/08/using-hierarchy-custom-settings-in-salesforce-com/

Best Regards
Naga Kiran
farukh sk hdfarukh sk hd
Hierarchy custom setting let's you personalize setting for specific role and profile. 

Methods available with Hierarchy custom settings are: 

1)getOrgDefaults(); 
2)getInstance(); 

For more detail visit,
https://www.sfdc-lightning.com/2018/09/custom-settings-in-salesforce.html