Definition
Custom Settings in Salesforce are a special type of custom object that allows administrators and developers to store reusable configuration data at the organization, profile, or user level. There are two types: List Custom Settings (store a dataset accessible across the org) and Hierarchy Custom Settings (store settings that can be overridden at the profile or user level). Custom Settings data is cached in the application cache, enabling fast access without SOQL queries.
Real-World Example
At their company, an admin at Redwood Financial leverages Custom Settings to ensure the Salesforce org runs smoothly and securely. They configure Custom Settings during a scheduled maintenance window, test it in a sandbox first, and then deploy to production. The result is tighter security and a more streamlined experience for all 200 users in the org.
Why Custom Settings Matters
Custom Settings are a specialized type of custom object designed for storing configuration data that code reads frequently. Unlike regular custom objects, Custom Settings are cached in the application cache, so Apex code can read values using methods like getInstance() without consuming SOQL query limits. This makes them well-suited for configuration that's accessed often: feature flags, default values, thresholds, and lookup data that gets read on every request.
There are two types. List Custom Settings store a set of records accessible across the org, like a list of valid country codes or tax rates. Hierarchy Custom Settings store values that can be overridden at different levels: the org default, specific profiles, and specific users. When code requests a value, the platform returns the most specific one it finds. Hierarchy Custom Settings are useful when different user populations need different configuration without building separate logic. Custom Metadata Types have mostly replaced Custom Settings for configuration that should deploy with code, but Custom Settings remain useful when you need runtime editability per profile or per user.
How Organizations Use Custom Settings
- •Redwood Financial — Uses Hierarchy Custom Settings to store per-user preferences for a custom app. The default is one setting, but specific profiles and users can override it, giving them flexibility without code changes.
- •NovaScale — Migrated feature flags from Hierarchy Custom Settings to Custom Metadata Types. The metadata approach fit their CI/CD process better, but they kept Hierarchy Settings for values that needed to be edited in production without a deployment.
- •Vertex Global — Caches frequently-read lookup data (country codes, currency conversion rates) in List Custom Settings so Apex code can read the values without consuming query limits.
