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
girishbhandarigirishbhandari 

There is already a Child Relationship named

Hi I am getting the error: "There is already a Child Relationship named" for the following fields for ANT script migration.

 

Error: objects/Bid_Request__c.object(658,13):There is already a Child Relationship named RFPs on User.
Error: objects/Bid_Request__c.object(681,13):There is already a Child Relationship named Bid_Requests on Opportunity.
Error: objects/Bid_Request__c.object(713,13):There is already a Child Relationship named Bid_Requests1 on User.
Error: objects/Bid_Request__c.object(725,13):There is already a Child Relationship named Bid_Requests on Contact.
Error: objects/Bid_Request__c.object(748,13):There is already a Child Relationship named Bid_Requests on Account.
Error: objects/Bid_Request__c.object(952,13):There is already a Child Relationship named Bid_Requests on User.

 

This is basically parent child relationship between, standard objects (Opportunity,User,Contact,Account) and new custom object "BidRequest".


When i first deployed from dev to sandbox the deployment worket fine.Then i deleted all the deployed custom objects.
Later when i again did a new deployment it failed.


What is really strange is on the target environment(sandbox) no custom fields exists with the above mentioned "relationshipLabel" but still i keep getting the error.

Best Answer chosen by Admin (Salesforce Developers) 
rocwilcoxrocwilcox

just a guess but did you delete these fields/objects from the "recyle bin" for fields/objects?

go to the customize fields area for each of those standard objects and 'erase' those deleted fields permemently.

..and do the same for the custom objects..

 

 

All Answers

rocwilcoxrocwilcox

just a guess but did you delete these fields/objects from the "recyle bin" for fields/objects?

go to the customize fields area for each of those standard objects and 'erase' those deleted fields permemently.

..and do the same for the custom objects..

 

 

This was selected as the best answer
girishbhandarigirishbhandari

After spending lot of time over the past few days i finally resolved the issue. And as you suggested the issue was due to objects were just deleted and not erased. After i "Erased" the object and all its fields the issue was resolved.

 

Thanks for replying rocwilcox, i appreciate it.

 

 

F SmoakF Smoak
Guys just wanted to drop a thanks note as I faced same issue and this thread was helpful :)
atul.k1.393764613458095E12atul.k1.393764613458095E12
Sorry, this did not help for me. I have a sandbox wher opportunity is having child relationship with custom object.
After deleting custom objects and cleaning the recycle bin, I tried to deploy using ant scripts. Yet get the error: There is already a child relationship
sunny.sfdcsunny.sfdc
Hi, I am facing similar issue. The thing is its not giving any error in the source org but when I try to deploy the object in destination org it throws errors for duplicate relationships. 

My deleted fields section is empty.

Is there anyway we can skip this check as it seems it is something not enforced by salesforce as mandatory? Or changing the relationship name is the only solution (If thats so, I need to change lot of fields relationships as salesforce didnt throw any error/warning while creating those)?

TIA 
Rodrigo Souza 11Rodrigo Souza 11
Updating this topic so that future generations can solve it faster than I did.
In my case, after deleting everything in lightning, I had to go into salesforce Classic -> Setup -> Objects -> Deleted Objects and Erase them all, after that my ANT deployment went smoothly.

Cheers!
Emily BolanEmily Bolan
Hi - I went into SalesForce Classic -> Setup

But I do not see "Objects" after that. Is it a subtopic somewhere? I am thinking i need to "erase" instead of delete as well. Getting the same error in deployment. 
Falaina CRMFalaina CRM
Hi All, I am facing a similar issue. When I try to deploy the object in destination org, it throws errors for duplicate relationships. 
"There is already a Child Relationship named Contracts3 on Organization."
My deleted fields section is empty.
Is there any solution? Can anyone help on this?
 
Bill Lessard 1Bill Lessard 1
Fix for me:
1. Checked and Cleared Recycle Bin on both environments (just to be safe). [Optional]
2. Changed Name of Field on target environment to match source sandbox.  Why?  The Field ID matches on both sides, but the Unique Field Name value didn't. (e.g. originalname__c vs. newname__c).

Why it worked?
In my dev sandbox I reviewed the existing lookup field and found it only changed the unique name (i.e. from originalname__c to newname__c).  This means the unique Field Id doesn't change just the name.  That's right the Id is same but unique name changed. 

So when Salesforce tried to deploy the new Object it found a mismatch and didn't try to resolve... instead it just pushed back the error.  I'm not certain I understand why Salesforce couldn't solve itself.

 
Nora ReguigNora Reguig
@Rodrigo Souza 11, thank you