function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Legendary PerformanceLegendary Performance 

Migration error - 'There is already a Child Relationship named Quotes on User'

whenever I am trying to migrate one custom object to production. it is throwing this error.

 

"objects/GFQuote__c.object

                    GFQuote__c.BDM__c: There is already a Child Relationship named Quotes on User "    

 

where as both the environment has the existing field BDM__c.

 

Can any body quickly comment on this. Waiting for reply

Best Answer chosen by Admin (Salesforce Developers) 
forecast_is_cloudyforecast_is_cloudy

Hmmm. Are you using Eclipse to do the migration? If so, can you manually remove the 'BDM__c' field from the metadata XML for the 'GFQuote__c' object and try your deployment again? Since the Metadata API is additive, you don't have to worry about deleting the 'BDM__c' field from the target Org. Its a hack and doesn't resolve the underlying issue (whatever that is), but hopfully it will allow you to continue with your deployment. 

All Answers

forecast_is_cloudyforecast_is_cloudy

Is the type of the 'BDM__c' field different between the 2 Orgs (i.e. one is Lookup and the other is Master-Detail)?

Legendary PerformanceLegendary Performance

No. both are look up only.

forecast_is_cloudyforecast_is_cloudy

Hmmm. Are you using Eclipse to do the migration? If so, can you manually remove the 'BDM__c' field from the metadata XML for the 'GFQuote__c' object and try your deployment again? Since the Metadata API is additive, you don't have to worry about deleting the 'BDM__c' field from the target Org. Its a hack and doesn't resolve the underlying issue (whatever that is), but hopfully it will allow you to continue with your deployment. 

This was selected as the best answer
Joshua Davies.ax1788Joshua Davies.ax1788

I had a similar problem and I was able to figure out what it was (since OP posted this two years ago, I imagine he's found a workaround since, but if somebody else gets here through a google search like I did, read on).  I had an existing lookup relationship from "Parent__c" to "Child__c" and I added a second lookup to the same object.  Well, when you do that, Salesforce goes ahead and creates a default "Child Relationship Name" called "Parent_Child".  It turned out that this was in conflict with another item relationship name that existed in the target org.  So take a look at the "Lookup Options" under the "Custom Field Defintion" for the field you're trying to migrate in.