Definition
Hierarchy Custom Settings in Salesforce are a type of Custom Setting that uses a built-in hierarchy to personalize application behavior at three levels: organization-wide defaults, profile-level overrides, and individual user-level overrides. When code or a formula accesses a Hierarchy Custom Setting, Salesforce checks for a value at the current user level first, then the user's profile, and finally the org default, returning the most specific match. Hierarchy Custom Settings data is stored in the application cache, which means accessing it does not count against SOQL query limits. They are commonly used for feature flags, thresholds, and per-user configuration values.
Real-World Example
an admin at Redwood Financial recently implemented Hierarchy Custom Settings to ensure the Salesforce org runs smoothly and securely. They configure Hierarchy 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 Hierarchy Custom Settings Matters
Hierarchy Custom Settings in Salesforce are a type of Custom Setting that uses a built-in hierarchy to personalize application behavior at three levels: organization-wide defaults, profile-level overrides, and individual user-level overrides. When code or a formula accesses a Hierarchy Custom Setting, Salesforce checks for a value at the current user level first, then the user's profile, and finally the org default, returning the most specific match found.
Hierarchy Custom Settings data is stored in the application cache, which means accessing it does not count against SOQL query limits. This makes them especially valuable for frequently-accessed configuration values where you don't want to consume queries on every access. They're commonly used for feature flags (turning features on or off without deploying code), thresholds (numeric limits that might vary by user or profile), per-user configuration values (like default record types or working preferences), and integration credentials that need user-level differences. Custom Metadata Types are an alternative for some use cases, but Hierarchy Custom Settings are still the right choice when per-user or per-profile values are needed.
How Organizations Use Hierarchy Custom Settings
- •TerraForm Tech — Uses Hierarchy Custom Settings for feature flags, letting them enable new features for specific profiles before turning them on org-wide.
- •NovaScale — Stores per-user thresholds in Hierarchy Custom Settings so different users see different alert levels based on their role and tenure.
- •CodeBridge — Uses Hierarchy Custom Settings for configuration that needs three-level fallback, choosing Custom Metadata Types for static config that doesn't need user-level overrides.
