Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What is the difference between Custom Setting Type "List" and "Hierachy"?

share|improve this question
up vote 20 down vote accepted

What's your use case? One will fit better than the other.

Hierarchy custom settings can be configured at varying user specificity levels under a single name; the platform will look for the most specific configuration first, then fall back / inherit to the least specific:

  • setting per user,
  • setting per profile,
  • setting for whole org,

Hierarchy custom settings are easily retrieved in Visualforce: {!$Setup.Setting__c.Field__c} and will be resolved according to the current user context.

hierarchy custom setting

List custom settings have user-independent values, retrieved under multiple names. For example, you could use several configs to hold the credentials for a web service callout so that you can swap the endpoints:

  • setting for development environment,
  • setting for volume testing environment,
  • setting for production environment,

List custom settings need to be accessed using a controller if you want to avail them on a page, for example return ListSetting__c.getInstance('dev').Field__c;

list custom setting

share|improve this answer
I might adjust the wording of the last statement, as you typically wouldn't want to "query" a custom setting in Apex, you use an accessor method to retrieve the cached setting values. But good answer otherwise. – Peter Feb 25 '13 at 9:51
At the moment I don't have complicated use cases, I have been working with List most of the time, I didn't have a clue what Hierarchy was, and wanted a clear explanation that showed the differences between List and Hierachy, thanks, i'll be checking that out! – pjcarly Feb 25 '13 at 10:22
Great answer. I would suggest amending from "Sometimes one or the other is a more appropriate fit..." to "One or the other is always a more appropriate fit..." since they are so different in their usage. Lists are great for global registry-like settings, and hierarchy are great for settings that may need different values for different groups or individual users. I've never seen a requirement that could "correctly" be satisfied by either - one is always more appropriate than other, but both are very useful. – jkraybill Feb 25 '13 at 11:36
thanks WesNolte and @jkraybill - I've differentiated 'org-wide under multiple names' vs 'user-specific under a singular name' – bigassforce Feb 25 '13 at 12:03
Very nice answer buddy! Screenshots with drop-shadows - what the... ;-) I would perhaps suggest providing a different example use case for list settings - I think the docs use tax codes - to distinguish the types even more clearly – Stephen Willcock Feb 26 '13 at 20:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.