Activity › Forums › Salesforce® Discussions › What is Custom Metadata Type in Salesforce? How is it different from Custom Objects and Custom Settings?
Tagged: Custom Metadata Type, Metadata, Metadata API, Salesforce Custom Object, Salesforce Custom Settings, Salesforce Customization
-
What is Custom Metadata Type in Salesforce? How is it different from Custom Objects and Custom Settings?
Posted by Subhendu on January 10, 2018 at 11:52 AMWhat is Custom Metadata Type in Salesforce? How is it different from Custom Objects and Custom Settings?
Adarsh replied 8 years, 4 months ago 2 Members · 1 Reply -
1 Reply
-
Hello Subhendu,
Custom Object – In Salesforce, you’re able to create a custom object to store a particular set of data where users can create and manage that data all under a tab.
Custom Setting – 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.
Custom Metadata – Custom metadata is customizable, deployable, packageable, and upgradeable application metadata. First, you create a custom metadata type, which defines the form of the application metadata. Then you build reusable functionality that determines the behavior based on metadata of that type. Similar to a custom object or custom setting, a custom metadata type has a list of custom fields that represent aspects of the metadata.
Custom metadata types generally were known as metadata of metadata. The main advantage to using the custom metadata types is you can add both definition and records in the package or changeset. These are same as the custom object and custom setting that resides in Application Cache instead of Org Data Storage.Unlike custom setting metadata use __mdt in its API name.
Advantages of Custom Metadata:
1. Metadata are deployable! No more annoying configuration after deployment, which you have to do with Custom Settings. You don’t need to create Apex classes to generate your default Custom Setting records.
2. They have WAY more options that Custom Settings: picklist fields, long text areas (in Spring ’17), page layouts, and validation rules.
3. The beauty that is Metadata Relationships! You can create lookups between Custom Metadata objects. Additionally, you can create an Object Definition lookup.
4. Custom Settings have the same permission to edit the records and to edit the configuration. Both can be done with the “Configure Application” permission. With Custom Metadata, you can edit the records with “Configure Application” but you require “Author Apex” to edit the configuration.
Hope it helps 🙂
Log In to reply.