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
sfdclearnsfdclearn 

Test class has 100% coverage and unable to install it as package in the production.

 

Now the code coverage is 100% and i am trying to deploy that to production. I am using package to push this trigger and the test class to production. When i try to install the package in the production is shows package installation error saying that

"Duplicate RelationshipNameCustom Field DefinitionsThe relationship name "Cases__r" is already used by custom field Case.Opportunity__c. Please rename existing relationship name."

When i try to put the trigger and test class in the package this custom field automatically added to this package. Not sure why.

please advise.

sanjaypatidarsanjaypatidar

is the opportunity__c field on the Case already there ? or you are creating new ?

sfdclearnsfdclearn

Opportunity__C is already there is case object in the production.

 

sfdclearnsfdclearn

I used the deployment connection instead of using package and it got installed successfully.

 

 

sfdclearnsfdclearn

still curious about knowing why it this custom field got added into the package automatically. anyone please advise.

sfdclearnsfdclearn

I used the deployment connection.