Define a Custom Metadata Type Declaratively
- Search Setup for Custom Metadata Types.
- On the All Custom Metadata Types page, click New Custom MetadataType, or click the Label name to modify an existing custom metadata type.
- Complete these fields.FieldDescriptionLabelRefers to the type in a user interface page.Plural LabelThe plural name of the type. If you create a tab for this type, Plural Label is used.Starts with a vowel soundIndicates whether “an” precedes the label rather than “a.” (Only when applicable for your org’s default language.)Object NameA unique name for referring to the object when using the API. In managed packages, this name prevents naming conflicts with package installations. Use only alphanumeric characters and underscores. The name must begin with a letter and have no spaces. It cannot end with an underscore or use two consecutive underscores.DescriptionAn optional description of the object. A meaningful description helps you understand the differences between your custom objects when you view them in a list.VisibilityWho can see the type.Public—Anyone can see it.Protected—If the type is installed as part of a managed package, only Apexcode in that managed package can use it.
- Public—Anyone can see it.
- Protected—If the type is installed as part of a managed package, only Apexcode in that managed package can use it.
- Click Save.
- Under Custom Fields, click New to start adding fields to the custom metadata type. Specify the type of information that the field contains, such as a picklist ormetadata relationship. For each field, choose a Field Manageability value to determine who can change the field later. If FieldType is MetadataRelationship and the manageability of the entity definition field is subscriber-controlled, the Field Definition field must be subscriber-controlled. If the manageability of the entity definition field is upgradeable, the Field Definition field must be either upgradeable or subscriber-controlled.