Deployment – Invalid Field:NAME in Related List:ManyWhoRelatedPeopleList

deploymentevent

I'm deploying a Page Layout for Event from GitHub to my integration org.

The deployment fails with this error: Invalid field:NAME in related list:ManyWhoRelatedPeopleList

The relevant XML from the source layout is:

<relatedLists>
    <fields>NAME</fields>
    <fields>TYPE</fields>
    <relatedList>ManyWhoRelatedPeopleList</relatedList>
</relatedLists>

Why is this happening and how do I fix this?

Best Answer

The reason for this is the target org does not have Allow Users to Relate Multiple Contacts to Tasks and Events enabled

enter image description here

If you check the box, this exposes several fields and in particular, the related list ManyWhoRelatedPeopleList. Thus, the deployment will work. This related list is called Name in the Page Layout UX

enter image description here