You are here:
Custom Metadata Types
You can create your own declarative developer frameworks for internal teams, partners, and customers. Rather than building apps from data, you can build apps that are defined and driven by their own types of metadata. Metadata is the information that describes the configuration of each customer’s organization.
Required Editions
| Available in: Salesforce Classic and Lightning Experience |
Available in: Enterprise, Performance, Unlimited, and Developer Editions You can create, edit, and delete custom metadata type records from installed packages in: Group and Professional Editions |
- What are Custom Metadata Types?
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. - Create, Edit, and Delete Custom Metadata Types and Records
You can use Setup to create, update, and delete custom metadata types and records declaratively. Use the Metadata API to perform these tasks programmatically. - Custom Metadata Relationships
Create relationships between custom metadata types, entity definitions, field definitions, or entity particles. Use relationships rather than text fields to directly reference objects, simplify your Apex code, and enforce referential integrity, for example, when packaging custom metadata types. - Custom Metadata Type Validation Rules
Validation rules verify that the data a user enters in a record meets the standards you specify before the user can save the record. A validation rule can contain a formula or expression that evaluates the data in one or more fields and returns a value of “True” or “False”. Validation rules also include an error message to display to the user when the rule returns a value of “True” due to an invalid value. - Reference Custom Metadata Type Records in Default Values
Default field values make your users more productive and decrease errors by reducing the number of fields to fill in manually. Reference a custom metadata type record in a default value. If a default field value changes, you can update it in the custom metadata type instead of updating multiple field references. - Custom Metadata Types and Advanced Formula Fields
When you create a custom metadata type, you can reference its values in an advanced formula field. If a field value changes, you can update it in the custom metadata type instead of changing multiple, hard-coded formulas. If you use packaging, define the logic you want and allow your subscribers to customize the details. - Create and Manage Custom Metadata Types Using CLI Commands
You can use the Salesforce command-line interface (CLI) to create custom metadata types, generate fields, create records, create records from a CSV file, and generate custom metadata types from an sObject. - Access Custom Metadata Records Programmatically
Use SOQL to access your custom metadata types and to retrieve the API names of the records of those types. - Control Read Access to Custom Metadata Types
Admins with the Customize Application permission can grant Read access to specific custom metadata types through profiles and permission sets. - Protection and Privacy Options for Custom Metadata Types
Manage the visibility and permissions of custom metadata types. - Package Custom Metadata Types and Records
You can package custom metadata types and records in unmanaged packages, managed packages, or managed package extensions. Your packages can then be installed in Professional, Developer, Enterprise, Performance, Unlimited, and Database.com Edition organizations. - Custom Metadata Types and Process Builder
Reference custom metadata type records from a Process Builder formula to automate your business processes, reusing functionality that you define. To change a value, you can update it in the custom metadata type instead of in your process and any hard-coded formulas that your process uses. - Deploy Custom Metadata Types and Records to Production Orgs Using Change Sets
Use change sets to deploy custom metadata types and records from a sandbox to another org. Typically you deploy the change set to a production org. - Custom Metadata Types Limitations
When using custom metadata types, be aware of these special behaviors and limitations. - Custom Metadata Allocations and Usage Calculations
Understand requirements for custom metadata types and records and how your custom metadata type usage is calculated.
Did this article solve your issue?
Let us know so we can improve!

