Difference between Custom Settings and Custom Metadata Types in Salesforce? | what is custom settings and custom metadata in salesforce

There are two type of Custom Setting List and Hierarchy.

List custom setting:- List custom setting provides a reusable set of static data that can be accessed across your organization to all user.

Hierarchy custom setting:- Hierarchy custom setting uses a built-in hierarchical logic for specific profiles or users. It can be used in to OWD role hierarchy.

Custom Metadata:- It describe the structure of object and there field as well as the page layout associated with them. It is used to define application configurations that need to be migrated from one environment to another, or packaged and installed

We can go through the details of difference between "Custom Settings and Custom Metadata" given below table:-



To know more details about custom settings and custom metadata, Click Here.





Custom Settings Custom Metadat Types
It is similar to custom object, Where we can create field like text, date, text area, checkbox, currency, email, number, phone, percent etd, but do not create any kind of lookup relationship. It describe the structure of object and there field, as well as the page layout associated with them.
here are 2 types of custom setting, List and Hierarchy. Once you create custom setting, then you cannot change the type (List to hierarchy or vice versa). It is used to define application configurations that need to be migrated from one environment to another, or packaged and installed.
List custom setting provides a reusable set of static data that can be accessed across your organization to all user. You can control the visibility of Custom Metadata Types by specifying it as public or protected. If it is marked as public type, then anyone can see it. If it is marked as protected type, in the installed managed package subscriber organization, only Apex code in that managed package can use it.
Hierarchy custom setting uses a built-in hierarchical logic for specific profiles or users. It can be used in to OWD role hierarchy.
Custom settings do not support relationship fields. You can createYou can access custom setting data using instance methods and can avoid SOQL queries to database. lookups between Custom Metadata objects.
You can access custom setting data using instance methods and can avoid SOQL queries to database.
While migrating custom setting to another org, It only deploys the metadata, you need to upload data into the custom setting post deployment.
Custom setting can be used by formula fields, validation rules, flows, Apex, and the SOAP API.
You cannot access List custom setting in Validation rule. Only Hierarchy custom setting can be used.
You can perform CUD (Create, Update, Delete) operation on custom setting in apex. You cannot perform CUD (Create, Update, Delete) operation on custom metadata type in apex.
Custom settings are not visible in test class without “SeeAllData” annotation. Custom metadata type are visible in test class without “SeeAllData” annotation.
You can control the visibility of custom setting by specifying it as public or protected. If custom setting is marked as protected, the subscriber organization will not be able to access the custom setting. If it is marked as public, then subscriber org can also access it.



To know more live demo source code in Salesforce lightning, Trigger, Visualforce & LWC, Use this link..



Difference between Custom Settings and Custom Metadata Types in Salesforce? | what is custom settings and custom metadata in salesforce Difference between Custom Settings and Custom Metadata Types in Salesforce? | what is custom settings and custom metadata in salesforce Reviewed by Admin on 4:19 AM Rating: 5

26 comments:

  1. In this blog I get a great post please also visit my blog I post a great content https://techkashif.com/maharashtra-girls-whatsapp-group-links-5/

    ReplyDelete
  2. It is a nice blog.
    https://tutorialform.com/how-to-create-facebook-account/

    ReplyDelete
  3. It has helped other sectors of the economy like agriculture, industry and the service industry. The resources of the country are being used for deriving the highest possible output for the benefit of the society. Salesforce training in India



    ReplyDelete

header banner -- www.w3web.net



Powered by Blogger.