I created an unmanaged package that includes a reference to a field that already exists in the target org. I tried to get around this problem by selecting the "Rename" option in the install page, but the error persists:

Organization: Test Org (xxxxxxxxxx)
User: Michael Sobczak (xxxxxxxxxx)
Package: Some package (xxxxxxxxxx)


1.  Duplicate Name
The name "Asset.Entitlement_Status__c" is already used on component type: Custom Field Definition. Please rename existing component.

Would creating a managed package resolve this issue?


Managed package will resolve this issue. Basically, this field/component conflict occurs because of the there is no namespace added in the package. A namespace is a unique identifier for your ORG and prevents different packages to have a field/component etc with exactly the same name.

Once your Namespace is registered you can either create Managed or Unmanaged packages and your Namespace has to be unique across Salesforce orgs.

Namespace prefix:

  1. Distinguishes your package and its contents from those of other developers.
  2. Is unique across all salesforce.com organizations.
  3. Ensures your exclusive control of all package components.
  4. Automatically prepends to all components (custom objects, fields, and others).
  5. Never changes.

See the below salesforce articles: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_namespace_prefix.htm


Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.