Root cause:

This is a Salesforce known issue when deploying object with MasterDetail relationship.

Assume you have two objects Invoice and InvoiceItem with InvoiceItem being a child of Invoice. InvoiceItem.Parent_Invoice is a master-detail lookup to Invoice. If you only deploy InvoiceItem, the above error will occur.


Add the master-detail lookup field to the deployment (even if it has not changed) to your deployment selected list.

In the example above, add InvoiceItem.Parent_Invoice to the list, in addition to InvoiceItem object.

Are you still using change sets ? Try today and deploy Salesforce 10x faster.

Did this answer your question?