What is custom setting in salesforce


Custom Settings :

  • Custom settings enable you to create custom sets of data, as well as create and associate custom data for an organization, profile, or specific user. …
  • You can control the visibility of custom setting by specifying it as public or protected. …
  • There are 2 types of custom setting, List and Hierarchy. …

More items…

Custom Settings in Salesforce are similar to custom objects in Salesforce. It allows users to create custom sets or custom chunks of data which creates easier access of data to users. Some particular data that you want to automatically fetch from the records can be easily done by using Custom Settings.


Table of Contents

How do I create a custom report in Salesforce?

Step 1: Defining the Custom Report

  1. Select the primary object, in this case, “ Accounts ”. Fill all the necessary information, as we did in Example 1. …
  2. Report Records Set Now define object relationship for this custom report type. …
  3. Report Layout

What are the advantages of using Salesforce?

What Are the Benefits of Salesforce?

  1. Customer information. One of the biggest advantages of using Salesforce is the information it retrieves — both the quality and the quantity.
  2. Account planning. With all of the customer information you need right at your fingertips, you — and all of the reps at your company — can make plans for …
  3. Time management. …
  4. Team collaboration. …
  5. Accessibility. …

Why should we use Salesforce?

Why Visualforce is used in Salesforce ?

  • Visualforce is used to create components that can be embedded into dashboards or accesses from their own custom tab.
  • We can embed sections with in the detail page.
  • Using visualforce we design visualforce page to display the activities for last 10 months and we can embed that section at the top of the contact detail page.

More items…

How to use custom labels in apex class in Salesforce?

To define custom labels, from Setup, in the Quick Find box, enter Custom Labels, and then select Custom Labels. In your Apex class, reference the label with the syntax System.Label.MyLabelName . Return label values as plain text strings. You can’t return a label expression using the $Label global value provider.

See more


What are custom settings used for in Salesforce?

Custom settings are similar to custom objects in that they let you customize org data. Unlike custom objects, which have records based on them, custom settings let you utilize custom data sets across your org. Custom settings also let you distinguish particular users or profiles based on custom criteria.

What is the custom setting?

Custom settings are similar to custom objects and enable application developers to create custom sets of data, as well as create and associate custom data for an organization, profile, or specific user. The custom setting data can then be used by formula fields, validation rules, flows, Apex, and the SOAP API.

What is the difference between custom setting and custom object?

Custom Object : Custom object is like any Database table that we used to have in SQL or in any other database. Custom Setting : Custom Setting is like configuration file that we used to have.

What are the two types of custom settings?

There are two types of custom settings: hierarchy and list. There are two types of methods: methods that work with list custom settings, and methods that work with hierarchy custom settings.

What is the advantage of using custom settings?

The main advantage of using Custom Settings is that the data is cached, which enables efficient access without the cost of repeated queries to the database. One doesn’t have to use SOQL queries which count against the governor limits.

What is custom setting and custom metadata in Salesforce?

Custom metadata type in salesforce is customizable, deployable, packageable, and upgradeable application metadata. Custom metadata types are mainly used for app configuration. Custom Metadata Types are similar to Custom Settings in Salesforce, except that they are deployable and packagable.

What is the difference between custom setting and custom labels?

Custom settings are used to store the custom configuration of your application depending upon your business process. Custom Labels are used to label static content on your visualforce pages to allow multi language support.

Can we deploy custom setting?

Hi Chanchal, Yes, we can deploy the object data and custom setting data with the help of change set.

Can we include custom setting in managed package?

Protected—If the custom setting is contained in a managed package, subscribing organizations can’t see the custom setting—it doesn’t display as part of the package list. In addition, subscribing organizations can’t access the custom setting using Apex or the API.

How many custom settings can be created in Salesforce?

300 fieldsYou can add up to 300 fields per custom setting, unless your field limit for custom objects is lower than 300. If your custom objects field limit is lower than 300, your field limit for custom settings is equal to your custom objects field limit.

What is custom label in Salesforce?

Custom labels enable developers to create multilingual applications by automatically presenting information (for example, help text or error messages) in a user’s native language. Custom labels are custom text values that can be accessed from Apex classes, Visualforce pages, Lightning pages, or Lightning components.

What are Governor limits in Salesforce?

Simply put, Salesforce Governor Limits are usage caps enforced by Salesforce to ensure efficient processing. They allow for multiple users of the platform without impeding performance. There are many different types of governor limits, some of which are tied to your Salesforce edition.

How to create custom settings in Salesforce?

You can create a custom setting in the Salesforce user interface: from Setup, enter Custom Settings in the Quick Find box, then select Custom Settings. After creating a custom setting and you’ve added fields, provide data to your custom setting by clicking Manage from the detail page. Identify each data set with a name.

What is custom setting?

There are two types of custom settings. A type of custom setting that provides a reusable set of static data that can be accessed across your organization. If you use a particular set of data frequently within your application, putting that data in a list custom setting streamlines access to it.

Can Apex access custom settings?

Apex can access both custom setting types—list and hierarchy. Note. If Privacy for a custom setting is Protected and the custom setting is contained in a managed package, the subscribing organization can’t edit the values or access them using Apex.

Can you include custom settings in a package?

The visibility of the custom setting in the package depends on the Visibility setting. Note. Only custom settings definitions are included in packages, not data.

What is Custom Settings in Salesforce?

Custom Settings is a way through which anyone can get easier and faster access to data. It creates custom chunks of data according to the user needs which are stored in the application cache to allow faster access in Salesforce.

Why do we need Custom Settings?

Let’s consider an example of a library where a member comes and asks for a particular book which is one of the most read books in the library, so the librarian every time needs to go that particular row to fetch that book, making it tiresome,

How to create Custom Settings in Salesforce?

As we know there are two different types of Custom Settings, let’s create both of them.

How to fetch Custom Setting in Salesforce?

Fetching custom settings is similar to fetching custom objects but the query script is different. Here is the difference between fetching a custom object query and fetching a custom setting query.

Disadvantages of Custom Settings in Salesforce

Custom Setting data cannot be deployed. You need to download the data and migrate it using a Data Loader or other migration tools.


In this blog, we learned how Custom Settings in Salesforce works and how it is applied in real-world scenarios. We also learned the difference between List Custom Settings and Hierarchy Custom Settings. Custom Settings allows the users to provide easy and faster access to data in Salesforce.

Subscribe to our newsletter

Signup for our weekly newsletter to get the latest news, updates and amazing offers delivered directly in your inbox.

Where are custom settings stored?

Custom Settings data is stored in the application cache, which enables efficient access without the cost of multiple repeated queries to the database. In fact, using Custom Settings avoids Governor Limits almost completely.

What are the two types of custom settings?

Moreover, there are actually two different types of Custom Settings: List and Hierarchy. A List Custom Setting is very similar to the way Custom Objects work. It caches your data, meaning access to data is low-cost and efficient, and there is no need to use SOQL queries that count against the aforementioned Governor Limits.

What is the difference between custom settings and data loader?

Custom Settings are a special type of Custom Object, with fewer bells and whistles. Custom Objects are record tables, while Custom Settings are configuration tables.


Custom settings methods are all instance methods, that is, they are called by and operate on a specific instance of a custom setting. There are two types of custom settings: hierarchy and list. There are two types of methods: methods that work with list custom settings, and methods that work with hierarchy custom settings.

Custom Setting Examples

The following example uses a list custom setting called Games. The Games setting has a field called GameType. This example determines if the value of the first data set is equal to the string PC.

Hierarchy Custom Setting Examples

In the following example, the hierarchy custom setting GamesSupport has a field called Corporate_number. The code returns the value for the profile specified with pid .

Country and State Code Custom Settings Example

This example illustrates using two custom setting objects for storing related information, and a Visualforce page to display the data in a set of related picklists.

What are Hierarchical Custom Settings

Custom Settings are similar to Objects, with one major benefit being that they don’t need to be queried using SOQL to be used. This means that using them doesn’t count towards SOQL Query Governor Limits.

Setting up Custom Settings

It’s worth noting that to create and use List Custom Settings, you’ll first need to enable them within the Data > Schema Settings menu of Setup.

The Use Case

Let’s follow this scenario: You’re the Salesforce Admin, working for a food manufacturing company, and there are various processes and procedures that the directors have asked you to implement into a digital checklist.

Preparing Custom Settings for the Flow

The Custom Settings that we created above will be used in this example. If you’ve not created them, and you want to play along, you should do so now.

Building the Flow

Next, we need to create the Flow. Head over to Flow Builder (Setup > Process Automation > Flows > New Flow), create a Screen Flow, and select Auto-Layout (you can use Freeform if you’d like, but I’ll be using Auto-Layout).


In this article, you’ve learnt about Custom Settings – List and Hierarchy – and how to use Hierarchy Custom Settings in Flows. Now if you, or someone who isn’t familiar with Flows, needs to change the questions that are exposed, all they need to do is update the values in the Custom Settings.


Leave a Comment