Custom Settings


Custom Settings: – Custom Setting in Salesforce is similar to Custom Objects that can be used to persist some sort of data.

Most important thing about Custom Setting is, it does not uses our salesforce data storage and resides in the application cache.

When using Custom Settings there is no Need of SOQL to retrieve the data.

Custom settings can also be referenced in formulas, so can be used in formula fields, validation rules, workflow rules, and visual force.

Access Hierarchy Custom Settings into formula field, Validation Rule, and VF page using below Syntax

$Setup.CustomSettingName__c.FieldName__c

Types Of Custom Settings

There are two types of custom settings:

  • List Custom Settings: A type of custom setting that provides a reusable set of static data that can be accessed across your organization.
  • Hierarchy Custom Settings: A type of custom setting that uses a built-in hierarchical logic that lets you personalize settings for specific profiles or users.

How to create Custom Settings: –

Setup -> Develop -> Custom Settings -> New -> For Label “Country Code” and for Object “Country_Code” and Save.

Permanent link to this article: https://salesforcebuddy.com/2018/12/custom-settings/

Leave a Reply

Your email address will not be published.