Custom Settings

Administration 🟡 Intermediate
📖 4 min read

Definition

Custom Settings is a user-defined extension of the Salesforce platform that administrators or developers create to meet specific business requirements not addressed by standard functionality. It allows organizations to tailor Salesforce to their unique processes and data needs.

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 provide a mechanism to store reusable configuration data that can be accessed efficiently across the org without consuming SOQL queries against the database. They come in two varieties: List Custom Settings, which store a static dataset accessible to all users, and Hierarchy Custom Settings, which support default values that can be overridden at the organization, profile, or individual user level. This makes them ideal for storing application configuration parameters, feature flags, tax rates, integration endpoints, and threshold values that need to be referenced frequently in Apex code, formulas, and validation rules.

As an org grows in complexity, Custom Settings become critical infrastructure for managing environment-specific configurations across sandboxes and production. Without them, developers hard-code values into Apex classes or formulas, making updates require code deployments instead of simple admin changes. Hierarchy Custom Settings are particularly powerful for rolling out features gradually — you can enable a feature for one user, then a profile, then the entire org. However, organizations should be aware that Salesforce recommends Custom Metadata Types for many use cases previously served by Custom Settings, since Custom Metadata Types are deployable via change sets and packages, while Custom Settings data is not.

How Organizations Use Custom Settings

  • Velocity Commerce — Velocity Commerce uses a Hierarchy Custom Setting called Tax_Configuration__c to store sales tax rates that vary by state. The default org-wide rate is 0%, but the admin sets overrides for each state-specific profile. Apex code in the checkout process reads the tax rate from the hierarchy without a SOQL query, keeping the transaction lightning fast even during holiday sale surges of 50,000+ orders per day.
  • Greenfield Healthcare — Greenfield Healthcare created a List Custom Setting called Integration_Endpoints__c that stores API URLs, timeout values, and retry counts for each external system they integrate with (EHR, billing, pharmacy). When they migrated to a new EHR vendor, the admin simply updated the endpoint URL in the Custom Setting instead of modifying and redeploying Apex code across three environments.
  • Atlas Education Group — Atlas Education Group uses a Hierarchy Custom Setting called Feature_Flags__c with a checkbox field for each new feature. During the rollout of a custom grading portal, the admin enabled the feature for the QA team's profile first, then expanded to teachers at one school, and finally toggled it org-wide. This controlled rollout caught two bugs before they reached the full user base of 2,000 educators.

🧠 Test Your Knowledge

See something that could be improved?

Suggest an Edit