Deprecated: Optional parameter $list declared before required parameter $is_script is implicitly treated as a required parameter in /home1/oijoiv2f/public_html/wp-content/plugins/apus-framework/libs/redux/ReduxCore/inc/class.redux_cdn.php on line 21

Deprecated: Optional parameter $register declared before required parameter $footer_or_media is implicitly treated as a required parameter in /home1/oijoiv2f/public_html/wp-content/plugins/apus-framework/libs/redux/ReduxCore/inc/class.redux_cdn.php on line 45

Deprecated: Optional parameter $register declared before required parameter $footer_or_media is implicitly treated as a required parameter in /home1/oijoiv2f/public_html/wp-content/plugins/apus-framework/libs/redux/ReduxCore/inc/class.redux_cdn.php on line 104

Deprecated: Optional parameter $expire declared before required parameter $path is implicitly treated as a required parameter in /home1/oijoiv2f/public_html/wp-content/plugins/apus-framework/libs/redux/ReduxCore/inc/class.redux_functions.php on line 54

Deprecated: Optional parameter $depth declared before required parameter $output is implicitly treated as a required parameter in /home1/oijoiv2f/public_html/wp-content/themes/entaro/inc/classes/megamenu.php on line 155

Deprecated: Optional parameter $depth declared before required parameter $output is implicitly treated as a required parameter in /home1/oijoiv2f/public_html/wp-content/themes/entaro/inc/classes/mobilemenu.php on line 147

Deprecated: Optional parameter $args declared before required parameter $wp_customize is implicitly treated as a required parameter in /home1/oijoiv2f/public_html/wp-content/plugins/apus-framework/libs/redux/ReduxCore/inc/extensions/customizer/extension_customizer.php on line 583

Deprecated: Optional parameter $args declared before required parameter $wp_customize is implicitly treated as a required parameter in /home1/oijoiv2f/public_html/wp-content/plugins/apus-framework/libs/redux/ReduxCore/inc/extensions/customizer/extension_customizer.php on line 606

Warning: Cannot modify header information - headers already sent by (output started at /home1/oijoiv2f/public_html/wp-content/plugins/apus-framework/libs/redux/ReduxCore/inc/class.redux_cdn.php:21) in /home1/oijoiv2f/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home1/oijoiv2f/public_html/wp-content/plugins/apus-framework/libs/redux/ReduxCore/inc/class.redux_cdn.php:21) in /home1/oijoiv2f/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home1/oijoiv2f/public_html/wp-content/plugins/apus-framework/libs/redux/ReduxCore/inc/class.redux_cdn.php:21) in /home1/oijoiv2f/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home1/oijoiv2f/public_html/wp-content/plugins/apus-framework/libs/redux/ReduxCore/inc/class.redux_cdn.php:21) in /home1/oijoiv2f/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home1/oijoiv2f/public_html/wp-content/plugins/apus-framework/libs/redux/ReduxCore/inc/class.redux_cdn.php:21) in /home1/oijoiv2f/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home1/oijoiv2f/public_html/wp-content/plugins/apus-framework/libs/redux/ReduxCore/inc/class.redux_cdn.php:21) in /home1/oijoiv2f/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home1/oijoiv2f/public_html/wp-content/plugins/apus-framework/libs/redux/ReduxCore/inc/class.redux_cdn.php:21) in /home1/oijoiv2f/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home1/oijoiv2f/public_html/wp-content/plugins/apus-framework/libs/redux/ReduxCore/inc/class.redux_cdn.php:21) in /home1/oijoiv2f/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1831
{"id":861,"date":"2017-07-27T06:45:16","date_gmt":"2017-07-27T06:45:16","guid":{"rendered":"http:\/\/www.salesforcenextgen.com\/?p=861"},"modified":"2020-12-28T19:44:40","modified_gmt":"2020-12-28T19:44:40","slug":"custom-setting","status":"publish","type":"post","link":"https:\/\/salesforcenextgen.com\/custom-setting\/","title":{"rendered":"Custom settings"},"content":{"rendered":"

Custom Settings<\/strong><\/p>\n

They are similar to a custom object, it enables a user to create custom data, make an association between them similar to the custom object. The difference is that the custom settings are exposed in the application cache, this data can then be efficiently accessed without querying the database and reduce the overall overhead at the server and improves the efficiency of the App. The custom setting can be used with validation rule, apex class or formula fields etc.<\/p>\n

There are two types of custom settings:<\/p>\n

    \n
  1. List Custom setting<\/li>\n
  2. Hierarchy Custom Setting<\/li>\n<\/ol>\n

    List Custom setting provides a reusable set of static data, we can put frequently access data in the custom setting and this can be accessed without SOQL query to the database. Data in list custom setting does not change with profile or user and is available throughout the organization.<\/p>\n

    Hierarchy custom setting is based on organization\u2019s hierarchy profile logic and is not available throughout the organization. It checks the context of the user for its profile, organization and then returns the lowest value.<\/p>\n

    The custom setting can be created from UI of Salesforce and can be managed after creating the setting.<\/p>\n

    Custom Setting methods<\/strong><\/p>\n

    These methods are all instance specific methods, they are called and operate by a particular instance of the custom setting. Custom methods are divided based on the type custom setting we are accessing.<\/p>\n

    List Custom Setting Methods<\/p>\n

    The following are instance methods are used to fetch values from list custom settings.<\/p>\n

      \n
    1. getAll(): Map of the dataset is returned in this method<\/li>\n
    2. getInstance(dataSetName): it returns the data of the specific dataset mentioned in the method.<\/li>\n
    3. getValues(dataSetName): it returns the data specific to the dataset name mentioned in the method.<\/li>\n<\/ol>\n

      Hierarchy Custom setting methods<\/p>\n

      The following are instance methods are used to fetch values from Hierarchy custom settings.<\/p>\n

        \n
      1. getInstance(): the return result is specific for a particular user.<\/li>\n
      2. getInstance(userId):returns the result specific for a\u00a0 specific user.<\/li>\n
      3. getInstance(profileId):returns the result specific for a\u00a0 specific profile.<\/li>\n
      4. getOrgDefault(): Returns the result for the Org<\/li>\n
      5. getValues(userId): Returns the result for the specific user.<\/li>\n
      6. getValues(profileId): Returns the result for the specific user<\/li>\n<\/ol>\n

        Also, Have a look at the below resources:<\/strong><\/h1>\n
          \n
        1. \n

          Best Salesforce Interview Questions book with Apex and Visualforce concept explained<\/a><\/h3>\n<\/li>\n<\/ol>\n

          Also, Have a look at the below learning resources:<\/strong><\/h1>\n
            \n
          1. \n

            SOQL (Salesforce Object Query Language)<\/a><\/strong><\/em><\/h3>\n<\/li>\n
          2. \n

            Apex Trigger Best Practices and the Trigger Framework<\/a><\/strong><\/em><\/h3>\n<\/li>\n
          3. \n

            Salesforce Interview Question and Answers Part 2<\/a><\/strong><\/em><\/h3>\n<\/li>\n
          4. \n

            Salesforce Interview Questions on Test Class<\/a><\/strong><\/em><\/h3>\n<\/li>\n
          5. \n

            Salesforce-lightning-interview-questions-2018<\/cite><\/span><\/a><\/strong><\/em><\/h3>\n<\/li>\n<\/ol>\n

            \u00a0 \u00a0 \u00a06.\u00a0Salesforce Interview Questions Batch Class\u00a0<\/a><\/strong><\/em><\/h3>\n

            7.\u00a0 Custom Setting in Salesforce<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"

            Custom Settings They are similar to a custom object, it enables a user to create custom data, make an association between them similar to the custom object.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[72],"tags":[40,76,61,74,45,75,38,42,55,51,52],"_links":{"self":[{"href":"https:\/\/salesforcenextgen.com\/wp-json\/wp\/v2\/posts\/861"}],"collection":[{"href":"https:\/\/salesforcenextgen.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/salesforcenextgen.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/salesforcenextgen.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/salesforcenextgen.com\/wp-json\/wp\/v2\/comments?post=861"}],"version-history":[{"count":3,"href":"https:\/\/salesforcenextgen.com\/wp-json\/wp\/v2\/posts\/861\/revisions"}],"predecessor-version":[{"id":2211,"href":"https:\/\/salesforcenextgen.com\/wp-json\/wp\/v2\/posts\/861\/revisions\/2211"}],"wp:attachment":[{"href":"https:\/\/salesforcenextgen.com\/wp-json\/wp\/v2\/media?parent=861"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/salesforcenextgen.com\/wp-json\/wp\/v2\/categories?post=861"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/salesforcenextgen.com\/wp-json\/wp\/v2\/tags?post=861"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}