Foo__c has master-detail relationship with object
Account through field
Foo__c also has master-detail relationship with object
Contact through field
Foo__c.Contact__c both exist in destination org and destination org is on Summer '20 Patch 7
I updated account layout in source org to display object
Foo__c related list as below and deploying to destination org:
Account-Account - Admin.layout:
<relatedLists> <fields>NAME</fields> <fields>Contact__c</fields> <relatedList>Foo__c.Account__c</relatedList> </relatedLists>
When deploying this layout using the command
sfdx force:source:deploy, running into error:
Invalid field:Contact__c in related list:Foo__c.Account__c
I even added fields
Foo__c.Contact__c to deployment package but still running into the error.
Deploying user has access to all the fields and objects involved and I double checked API names as well.