+ Start a Discussion

Duplicate Name on Record Type error during package installation?

Hi folks,


We've got an unmanaged package we're trying to deploy, and running into an issue when we are installing the package.  We have the following Record Types across a few objects:


Name / DeveloperName / SobjectType


Donation / Donation_Lead / Lead
Donation / Donation_Campaign / Campaign

Donation / Donation_CampaignMember / CampaignMember


Already existing in the SFDC instance is the following...


Donation / Donation / Opportunity


For reasons we can't understand, the package install fails with the following error:  "Duplicate Name    Record Type    The name "donation" is already used on component type: Record Type. Please rename existing component."


We can't figure out why this would be happening.  From the UI, we have no problem in creating Record Types with these Names(Label) and DeveloperNames (Name).  Any idea why this would error out in packaging install only?



Cory CowgillCory Cowgill

Have you tried renaming the developer name of the existing Record Types for Donation so that they are different than the Managed Package install? Obviously this has implications if you're using the API names anywhere else in the system (SOQL, etc).


Seems like based on below the Opportuinty Record Type is the one conflicting, as the other record types have diffrent API name than just donation.


Try renaming the Opportunity API name to Donation_Oppty and see if tha tresolve it.


Thanks for the idea.  We just tried to narrow things down as follows in our package...only including this one record type with the Name = Donation.


Name / Developer Name / Object

Donation / D_Lead / Lead


And, just a refresher, our current instance has the following in it already...


Donation / Donation / Opportunity


The result?  A failed package install.  Same error as above:  Duplicate Name Record Type The name "donation" is already used on component type: Record Type. Please rename existing component.


Funky, right?


As a further follow-up...

Here's what we've found tonight.  It seems like it could be something related to the NPSP's Opportunity Record Type fields.  We're testing our deployment on a fresh TrialForce NPSP install.  On our first try installing our package, with a RecordType record with Name = "Donation" and DeveloperName ="D_Lead", the install failed.  On our second try, before we installed our package, we changed the Opportunity RecordType record for donations from Name = "Donation" to Name = "Donations".  Then, we ran our install.  Worked perfectly.  After the install was complete, we went back to the Opportunity RecordType record, changed its Name = "Donations" back to Name = "Donation", and no errors...worked fine.

So, there seems to be something fishy going on here.  If you're installing a package that happens to have a RecordType with Name = "Donation" (which is just the label value for the record type), the installation seems to fail (or at least it has for us in tons of permutations).  If you follow our second process above, it seems to work fine.

I'm scratching my head thinking this is a candidate for a bug report either on the NPSP or SFDC's package installation process...but the latter seems like it would have come up before, right?


Unmanaged packages do not come with its own namespace like Managed package do. Thus, installing an Unmanaged package into an existing Org could cause name collisions. Managed Packages, the ones used by ISVs, have a unique namespace that is prepended to each custom item created to avoid any collisions. Note: The collision you're seeing is likely due to the API name of the recordtype, which defaults to the name for most objects and fields.