function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
madhumadhu 

what is custom label. And what is the difference between the custom settings and custom label. can u please eloborate it in details.

what is custom label. And what is the difference between the custom settings and custom label. And when we have to use custom settings and custom label.can u please eloborate it in details.
Sai Ram ASai Ram A
Madhu

Custom labels are custom text values that can be accessed from Apex classes or Visualforce pages. The values can be translated into any language Salesforce supports. 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.
Follow Link: https://help.salesforce.com/HTViewHelpDoc?id=cl_about.htm&language=en_US (https://help.salesforce.com/HTViewHelpDoc?id=cl_about.htm&language=en_US)

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. All custom settings data is exposed in the application cache, which enables efficient access without the cost of repeated queries to the database. This data can then be used by formula fields, validation rules, Apex, and the SOAP API.There are two types of custom settings:
1. List Custom Settings
2. Hierarchy Custom Settings
Follow Link: https://help.salesforce.com/HTViewHelpDoc?id=cs_about.htm&language=en_US (https://help.salesforce.com/HTViewHelpDoc?id=cs_about.htm&language=en_US)


If this solves your problem, kindly mark it as the best answer.

Thank you
BLearn
Stephen StoelingaStephen Stoelinga
Custom Labels and Custom Settings are both tools in Salesforce that allow you to store custom data, but they serve different purposes and have different use cases. Let's dive into the details of each:

**Custom Label**:
- Custom Label is a feature in Salesforce that allows you to create and manage custom text values that can be translated into multiple languages. It is primarily used for adding static text or messages in your application.
- Custom Labels are useful for storing text that appears on user interfaces, such as button labels, field names, error messages, and help text. Since they support translations, you can display different text for users based on their language settings.
- The key benefit of Custom Labels is that they enable you to keep text values separate from the application code. This makes it easier to manage and update text values without modifying the code. It also makes the application more maintainable and scalable.
subway gift card balance (https://www.subwaygiftcardbalance.online/)
**Custom Setting**:
- Custom Setting is a feature in Salesforce that allows you to create custom data storage similar to custom objects, but with a lighter structure. It allows you to store custom data that can be used across the application, and it is accessible via Apex code, Visualforce pages, and formula fields.
- Custom Settings are often used to store configuration data, settings, or preferences that need to be accessed and changed by administrators or users without needing to modify the code.
- Unlike Custom Labels, Custom Settings are not meant for text values but for storing various types of data, such as integers, strings, booleans, or even complex data types like lists or maps.
- There are two types of Custom Settings: hierarchical and list. Hierarchical Custom Settings allow you to define different values for different profiles or users, while List Custom Settings offer a collection of data that can be queried and accessed easily.

**Key Differences**:
1. **Data Type**: Custom Labels store only text values, whereas Custom Settings can store various data types, including text, numbers, booleans, lists, and more.
2. **Use Case**: Custom Labels are primarily used for displaying static text on the user interface, while Custom Settings are used for storing application configuration data that needs to be accessed and modified within the application.
3. **Accessibility**: Custom Labels are accessible through Visualforce pages, Apex code, and formula fields, but they are mainly used for displaying text. Custom Settings are accessible in similar ways, but they allow you to store and retrieve various data types for more complex use cases.
4. **Translations**: Custom Labels support translations, making it easier to display different text for users of different languages. Custom Settings do not support translations since they are meant for storing data rather than display text.

In summary, Custom Labels are primarily used for displaying static text on the user interface with multilingual support, while Custom Settings are used for storing various types of application data and configuration settings that can be accessed and modified within the application.