Definition
List Custom Settings in Salesforce are a type of Custom Setting that stores a flat list of reusable data records, similar to a custom object but with the advantage of being cached in the application cache for fast access without consuming SOQL query limits. Unlike Hierarchy Custom Settings (which return different values based on user, profile, or org), List Custom Settings simply store a collection of records that can be accessed by name. They are commonly used for storing lookup data such as country codes, state abbreviations, default values, or application configuration parameters. List Custom Settings data can be accessed in Apex using the getAll(), getInstance(dataSetName), or getValues(dataSetName) methods.
Real-World Example
Consider a scenario where the system admin at BrightEdge Solutions is working with List Custom Settings to control how users interact with Salesforce data and features. After configuring List Custom Settings in the sandbox and validating it with key stakeholders, they roll it out to production. User adoption improves because the interface now matches how teams actually work.
Why List Custom Settings Matters
List Custom Settings in Salesforce are a type of Custom Setting that stores a flat list of reusable data records, similar to a custom object but with the advantage of being cached in the application cache for fast access without consuming SOQL query limits. Unlike Hierarchy Custom Settings (which return different values based on user, profile, or org), List Custom Settings simply store a collection of records that can be accessed by name. They're commonly used for storing lookup data like country codes, state abbreviations, default values, or application configuration parameters.
List Custom Settings data can be accessed in Apex using the getAll(), getInstance(dataSetName), or getValues(dataSetName) methods. Because the data is cached, accessing List Custom Settings is fast and doesn't consume SOQL queries, which makes them efficient for frequently-referenced configuration data. Custom Metadata Types are an alternative for some use cases, particularly for static configuration that needs to be deployable through change sets and packages. Mature orgs choose between the two based on whether the data needs to be deployable (favor Custom Metadata) or just runtime-accessible (List Custom Settings work).
How Organizations Use List Custom Settings
- •TerraForm Tech — Stores a list of country and state codes in List Custom Settings, accessing them in Apex without consuming queries on every reference.
- •NovaScale — Uses List Custom Settings for application configuration parameters that need to change without code deploys.
- •CodeBridge — Chooses Custom Metadata Types for deployable configuration and List Custom Settings for runtime-only data.
