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/feed-rss2.php on line 8
difference between list and hierarchy custom settings in salesforce Archives - Salesforce Next Gen http://salesforcenextgen.com/tag/difference-between-list-and-hierarchy-custom-settings-in-salesforce/ Trailhead and Beyond Mon, 28 Dec 2020 19:34:15 +0000 en-US hourly 1 https://wordpress.org/?v=6.4.4 https://salesforcenextgen.com/wp-content/uploads/2020/10/cropped-76dc0dd6-326a-4956-a412-bfdf20c7fb23_200x200-32x32.png difference between list and hierarchy custom settings in salesforce Archives - Salesforce Next Gen http://salesforcenextgen.com/tag/difference-between-list-and-hierarchy-custom-settings-in-salesforce/ 32 32 How to use Custom setting in Salesforce? https://salesforcenextgen.com/how-to-use-custom-setting-in-salesforce/ https://salesforcenextgen.com/how-to-use-custom-setting-in-salesforce/#comments Tue, 27 Mar 2018 12:41:47 +0000 http://www.salesforcenextgen.com/?p=1299 How to use Custom setting in Salesforce? In this post we are going to discuss how to create a custom setting and how to use the Custom setting API. To know more about the custom setting kindly go through the post here. To create a Custom setting follow the below steps:- Go to setup and …
Continue reading How to use Custom setting in Salesforce?

The post How to use Custom setting in Salesforce? appeared first on Salesforce Next Gen.

]]>
How to use Custom setting in Salesforce?

In this post we are going to discuss how to create a custom setting and how to use the Custom setting API.

To know more about the custom setting kindly go through the post here.

To create a Custom setting follow the below steps:-

  1. Go to setup and click on the Quick find / search input box and type ‘custom settings’.
  2. Click on custom setting and then on the create custom setting page click on new button.Custom setting
  3. This will open New Custom Setting Definition page where we have to provide the custom setting with a label, Object name, its type (list/Hierarchy), visibility and its description.
  4. After filling all the information on the definition page click on save button.
  5. This will take you to the custom setting definition detail page. On this page all the system defined and the related information of the custom setting is displayed.
  6. On this page you can add new custom fields to the Custom setting similar to the Custom object, but data type of the new fields are limited as shown below.

Custom setting

  1. After selecting the data type remaining steps of creating the field is similar to the custom objects field creation.

Once you have created all the required fields the custom setting detail page looks something as below.

Custom setting

Once you have completed creating the custom setting, then it is the time to enter some data in the custom setting datasets. To insert the data we need to click on the manage button on the custom setting detail page, as shown below.

Custom setting

Clicking on the manage button, redirects to the dataset detail page where we can add. Delete and edit records of custom settings.

Custom setting

On tCustom settinghis page, to create a new record click on the new button and enter the value in the fields and click on save as shown below.

Custom setting

Once you have desired number of records I the custom setting. We can use the Custom setting API’s to fetch the records.

Below I have written a class which access the custom settings without making a SOQL call to database and returns a map of string and custom setting records.

public class CustomSettingCls {

public  map<String, IVL_Offline_document__c> fetchDocMapFromCustomSetting(String profileName){

map<String, IVL_Offline_document__c> mcs = new map<String, IVL_Offline_document__c>();

list<IVL_Offline_document__c> lcs = IVL_Offline_document__c.getall().values();

for(IVL_Offline_document__c recordCS : lcs){

if(recordCS.IVL_Profile_Name__c == profileName){

mcs.put(recordCS.Name, recordCS);

}

}

return mcs;

}

}

Also, Have a look at the below resources:

  1. Best Salesforce Interview Questions book with Apex and Visualforce concept explained

Also, Have a look at the below learning resources:

  1. SOQL (Salesforce Object Query Language)

  2. Apex Trigger Best Practices and the Trigger Framework

  3. Salesforce Interview Question and Answers Part 2

  4. Salesforce Interview Questions on Test Class

  5. Salesforce-lightning-interview-questions-2018

     6. Salesforce Interview Questions Batch Class 

7.  Custom Setting in Salesforce

The post How to use Custom setting in Salesforce? appeared first on Salesforce Next Gen.

]]>
https://salesforcenextgen.com/how-to-use-custom-setting-in-salesforce/feed/ 1