3

I am using custom metadata with a field of type Metadata Relationship(Field Definition) to provide the config side of an app, however when selecting Contact as the object I cannot find the FirstName or LastName fields. Is this a bug, is there a way around this?

enter image description here

2
  • Are you sure they're not just somewhere else in the list? Sorting gets a little off sometimes it seems.
    – Adrian Larson
    Mar 19, 2018 at 21:22
  • @AdrianLarson I just checked. It's not there...
    – sfdcfox
    Mar 19, 2018 at 21:24

2 Answers 2

5

It appears that Compound Fields are not supported except by their "name pointing" field. For example, you can't select Mailing State, but you can select Mailing Address. I'm still looking for a specific document that states this, but it's obviously a limitation of the current implementation.

3
  • Hmm pretty sure I was able to use Account.BillingCity, Account.BillingState, etc. They all used BillingAddress as the label but did point to the component fields.
    – Adrian Larson
    Mar 19, 2018 at 21:30
  • @AdrianLarson I've checked a few different fields, they don't appear as options when I try.
    – sfdcfox
    Mar 19, 2018 at 21:32
  • @sfdcfox thanks for confirming I am not going mad. I can work around it but have to add object/field specific check to what would be a pure dynamic method otherwise :(
    – Girbot
    Mar 19, 2018 at 21:44
2

I know this one is a bit old, but found this today that might help.

Whenever you create a Metadata Relationship to Entity Definition (to get a picklist with the SObjects) you get the option to create two additional Metadata Relationships

  • Field Definition
  • Entity Particle

https://help.salesforce.com/articleView?id=sf.custommetadatatypes_relationships_field_particle.htm&type=5

When choosing Entity Particle that gives you a picklist with all fields including compound fields (FirstName, LastName)

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .