Activity Forums Salesforce® Discussions What is the difference between Custom Setting and Custom Object in Salesforce?

  • Archit

    Member
    January 9, 2018 at 12:29 pm

    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. List type of custom setting acts like a custom object but there are differences in them like in custom settings there is a limit on no. of records, you can not write trigger, workflow etc on custom setting.

    For more information about limits and considerations of custom settings please Check Here.

    Hope this answer would be helpful!!

  • Rahul

    Member
    January 9, 2018 at 1:09 pm

    Custom Object: Custom objects are custom database tables that allow you to store information unique to your organization.In the API, the names of custom objects include a suffix of two underscores followed by a lowercase “c” . For example, a custom object labeled “Issue” in the Salesforce user interface is Issue__c in that organization’s WSDL.

    Custom Setting: Custom Setting allows you to store custom data sets and associate them on an org-wide, profile or user basis. Custom Settings are essentially custom objects that are exposed in the applications cache and are accessible via their own API.

    You can certainly build your own custom objects to store settings but using custom settings is much quicker (again they are stored in the application cache) and do not count against SOQL limits when fetched. You can also use custom settings in formula fields, validation rules, Apex code and the Web Services API.

     

  • Parul

    Member
    September 18, 2018 at 6:27 pm

    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. You can use custom settings to store a variety of information that can be accessed easily by other Salesforce tools.

    Use and example 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.

    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.

     

    Custom Object: Custom objects are custom database tables that allow you to store information unique to your organization.In the API, the names of custom objects include a suffix of two underscores followed by a lowercase “c” . For example, a custom object labeled “Issue” in the Salesforce user interface is Issue__c in that organization’s WSDL.

     

    Thanks

  • shariq

    Member
    September 19, 2018 at 9:42 pm

    Hi,

    Add more about custom setting -

    Custom settings is an standard object of the salesforce platform, where you can save your settings and associate it to the profile or user.

    Here is some info from the official doc:

    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.
    Generally you can use custom settings for the parameter that can not be stored in the profile or user object. For example "Google Maps Key" for all profiles or whole org. Or region for the specific profile

    Hope this helps.

Log In to reply.

Popular Salesforce Blogs