• #19134
    Salesforce | Suraj Suraj #317

    What is Custom Setting in Salesforce and where it is used?

    What is Custom Setting in Salesforce and where it is used?


    Salesforce | Saurabh Saurabh #928

    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:

Viewing 2 posts - 1 through 2 (of 2 total)

Please to reply to this topic.

Popular Salesforce Blogs


We're not around right now. But you can send us an email and we'll get back to you, asap.


About Us

Forcetalks is a Salesforce collaboration platform for coders & developers, geeks & nerds, consultants & business heads, admins & architects, managers & marketers and of course the business owners. A community where you can learn from, where you can contribute to. For you. For Salesforce. Read More...

Copyright 2020 Forcetalks. All Right Reserved.

Log in with your credentials


Forgot your details?