Try Serpent Free

How to fix DUPLICATE_DEVELOPER_NAME in Salesforce deployments

Two metadata components share the same Developer Name, which Salesforce requires to be unique.

Surfaces during: metadata deploy validation, before any DML runs

What it means

DUPLICATE_DEVELOPER_NAME means the deployment tries to create a component, a record type, a global value set, a permission set, whose Developer Name already exists in the target org, or collides with another component in the same deployment. Developer Names have to be unique within their namespace, so Salesforce blocks the deploy rather than picking a winner.

It's most common on components without a per-object namespace, like global value sets and permission sets, since record types and custom fields are scoped to their parent object and only collide with siblings on the same object.

Diagnosis

Common causes

Parallel development collision
Two developers independently created a component with the same Developer Name in separate branches or sandboxes.
Renamed component left a stale duplicate
A component was renamed in source, but the old Developer Name still exists in the target org, and the deploy tries to add a second one.
Copy-pasted metadata never renamed
Metadata XML was duplicated as a starting point for a new component, and the Developer Name was never changed before committing.

The fix

  1. Rename the newer component
    Give the incoming component a unique Developer Name and update any metadata that references it by that name.
  2. Delete the stale duplicate if obsolete
    If the existing component in the target org is genuinely no longer needed, remove it before redeploying.
  3. Coordinate naming conventions
    Agree on a naming pattern for record types, value sets, and permission sets across the team to prevent future collisions.
In practice

How Serpent prevents this

Serpent AI flags overlapping Developer Names across concurrent tasks at scoping time, before two branches of work ever collide in a deploy. See the Salesforce deployment error library.

No-code CI/CD pipeline builder in Serpent

Prevention

Prefix Developer Names by team or feature area
Adopt a naming convention, like a team or module prefix, for global value sets and permission sets so two people building in parallel are unlikely to pick the same name.
Retrieve fresh metadata before creating a new component
Sync from the target org immediately before adding a record type or value set, so a name that already exists there is visible locally first.
Never leave a copy-pasted Developer Name unedited
Make renaming the Developer Name and label the very first edit when duplicating an existing metadata file as a template.
Common questions

DUPLICATE_DEVELOPER_NAME, answered

Does Salesforce ever auto-resolve a Developer Name collision?
No. Salesforce always blocks the deployment rather than silently renaming or merging components, so the conflict has to be resolved by hand.
Can I rename a Developer Name after the component is created?
For most metadata types, no; the Developer Name is set at creation and effectively permanent. You can usually change the label, but the underlying Developer Name stays fixed.
Do Developer Names need to be unique across the whole org, or just per object?
It depends on the metadata type. Record types and custom fields are scoped to their object, so the same name can exist on two different objects; global value sets and permission sets are org-wide and must be unique everywhere.

Start free. No credit card, no install, no commitment.

Set up in under 15 minutes. No DevOps hire needed.

Curious about faster shipping before you dive in? Let's talk

Commitment free!