Custom object Foo__c has master-detail relationship with object Account through field Account__c.

Custom object Foo__c also has master-detail relationship with object Contact through field Contact__c.

Fields Foo__c.Account__c and 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:


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.Account__c and 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.

There are similar questions on this site but those issues are referring to Activities, AccountContactRelation which have some special properties and doesn't apply to my situation.

  • 1
    double-check the api names as well as permissions once again. – Mohith Shrivastava Jun 3 '20 at 3:23
  • @MohithShrivastava I confirm API names and permissions look correct. I double checked. – javanoob Jun 3 '20 at 3:52
  • what tool are you using to deploying this ? – Mohith Shrivastava Jun 3 '20 at 3:55
  • @MohithShrivastava Updated question with those details. – javanoob Jun 3 '20 at 4:02
  • 1
    I suggest use workbench to isolate if this issue is due specific to force:source:deploy. If have the zip file just use the workbench deploy utility. – Mohith Shrivastava Jun 3 '20 at 4:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.