Monday, July 30, 2018

Custom Settings in Salesforce



Custom Settings in Salesforce : 

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. 

Advantages of Custom Settings : 

1. Data in custom setting is available in application cache, hence efficient and fast access.
2. Using Custom Settings there is no Need of SOQL to retrieve the data. SOQL count against your governor limits.
3. There are some methods available in custom settings that we can use to get the data instead of SOQL.
Methods - getValues and getInstance methods.

Use Cases of Custom Settings:

1. Use to store sensitive data like - Credentials Information For. e.g stroing API Secret Keys or Credentials in Custom Settings.
2. List data include two-letter state abbreviations.
3. International dialing prefixes, and catalog numbers for products.

Types of Custom Settings:

List Custom Setting and Hierarchical Custom Settings

Limits in Custom Settings:

1. 300 Fields Per Custom Settings.
2. You can’t share a custom setting object or record.
3. No owner is assigned when a custom setting is created, so the owner can’t be changed.
4. The total amount of cached data allowed for your organization is the lesser of these two values:
    i.  10 MB
    ii. 1 MB multiplied by the number of full-featured user licenses in your organization.


For Detailed Reference - You may visit the below link :

No comments:

Post a Comment

Governor Limits Example-Too Many DML Statements :151

Governor Limits Example : Too Many DML Statements :151 (Sunil Sharma) Example:Code Hitting Governor Limits System.LimitExceptio...