We can say that Custom Metadata Types are just like the List Custom Settings in Salesforce but only difference is that in
Custom metadata types records are also treated as metadata(In custom settings records are treated as non metadata so you can't move custom settings records with the help of change sets) and
the records,the Custom metadata types with protected feature and fields in it with manageable feature.
Custom metadata types are typically used to define application configurations that need to be migrated from one environment to another, or packaged and installed.
Usually we will be designing the apps with the help of data records in custom objects or custom settings.Now you can create custom metadata types and add metadata records,with all the manageability that comes with metadata is package,deploy,and upgrade.The most advantage is here is that querying
custom metadata records doesn't count against SOQL limits.
Filed Types Supported by Custom MetadataType
- Checkbox
- Date
- Date and Time
- Email
- Number
- Percent
- Phone
- Text
- Text Area
- URL
Custom metadata fields and their manageability:
The developer of the Custom Meta Data type decides who can change the field values after they ate deployed to subscriber organization.
- Locked
after release: For any record of the type, the value of the field is
immutable after deployment, even on the developer organization
where the record was created.
- Subscriber
editable: Anyone with the correct permissions can change the value of
the field at will. Any changes the developer deploys do not
overwrite values in the subscriber's organization.
- Upgradable: The
developer of a record can change the value of the field by
releasing a new version of the custom metadata package. The subscriber
can’t change the value of the field.
Custom metadata records with protected feature:
If a developer releases protected records in a managed package, access to them is limited in specific ways.
- Code that’s in the same managed package as custom metadata records can read the records.
- Code that’s in the same managed package as custom metadata types can read the records that belong to that type.
- Code
that’s in a managed package that doesn’t contain either the type or the
protected record can’t read the protected records.
- Code that the subscriber creates and code that’s in an unmanaged package can’t read the protected records.
- The
developer can modify protected records only with a package upgrade. The
subscriber can’t read or modify protected records. The
developer name of a protected record can’t be changed after
release.
Notes:
1.A subscriber to a managed package
containing a custom metadata type can’t add their own fields to
that type. Only the org that develops the type can add custom fields to
it.
2.If you create a protected custom
metadata record in your organization, then it’s accessible only by
your code, code from unmanaged packages, and code from the managed
package that defines its type.
3.If you change a custom meta data type from
protected to public, its protected records remain protected and
all other records become public.
4.If you use Setup to create a new record
on a protected type, the Protected Component checkbox is checked
by default.
5.Once the custom metadata type is public, you can’t convert it to protected.
6.The subscriber can’t create records of a protected
type.
For more info related this please go through this
Link .
In next post I will cover how to create custom meta data types and what are the limits and limitations of Custom Metadata types.
Enjoy........!