Activity › Forums › Salesforce® Discussions › What is Custom Setting in Salesforce and where it is used?
Tagged: Custom Setting, Salesforce Customization, Settings
-
What is Custom Setting in Salesforce and where it is used?
Posted by Suraj on April 10, 2017 at 10:08 AMWhat is Custom Setting in Salesforce and where it is used?
Saurabh replied 9 years, 2 months ago 2 Members · 1 Reply -
1 Reply
-
Hello Suraj
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, flows, Apex, and the SOAP API.
There are two types of custom setting:
List Custom Settings
Hierarchy Custom Settings.To Know more,Please look here:https://help.salesforce.com/apex/HTViewHelpDoc?id=cs_about.htm
Use of Custom Settings
Hard-coding and good code are a match made in hell. RecordTypeIds are most vulnerable to this abuse, and we’re are all familiar with the frustration of finding that code that worked in environment A, suddenly stops working when it is promoted to say test. Why? Because possibly RecordTypeIds are different across the two environments.
Why hard-code when you can use Custom Setting for stuff like this ? Custom Settings are a SOQL inexpensive way of storing your configurable parameters in the safe confines of the Salesforce database, with all the conveniences of a custom object – create / edit via point and click – standard salesforce !You can use custom settings in Apex triggers – the fact that you are in a trigger doesn’t make any difference, you can use the mechanism for accessing via Apex:
To Know more,Please look here:http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_custom_settings.htm
Hope it may help you:
Log In to reply.