+ Start a Discussion
Shikha Devi 16Shikha Devi 16 

Relationship Datatype in custom metadatatype?


Can you please help to understand the functionality of relationship data type in custom meta data type? what is entity Defination in Custom meta data type?
NagendraNagendra (Salesforce Developers) 
Hi Devi,

Metadata relationships have a particular domain. When you create a metadata relationship field on a type, you can relate it to another custom metadata type.

When you create a record on a custom metadata type that has a relationship field, you pick the specific field, object, or custom metadata type that record relates to.

The value of a relationship field with the EntityDefinition domain is a custom or standard object that:
  • Supports custom fields
  • Supports Apex triggers
  • Supports custom layouts
  • Is not a type of activity, such as a Task or Event
  • Is not the User object
  • Is not a Trialforce object, such as a SignupReques
Entity Definition: This is a standard or custom object in metadata type relationship.

You can see the entity definition object and its fields by doing a SOQL query in workbench as below.
User-added image
Hope this helps.

Please mark this as solved if it's resolved so that it gets removed from the unanswered queue which results in helping others who are encountering a similar issue.