Skip to main content
All CollectionsTroubleshootingSalesforce validation errorsSalesforce validation errors
Resolving validation errors - "Duplicate label <xxx>" for deployment with Global Value Set metadata type
Resolving validation errors - "Duplicate label <xxx>" for deployment with Global Value Set metadata type

Cause and solution for this Salesforce validation error

Mateusz Kochanowicz avatar
Written by Mateusz Kochanowicz
Updated over a week ago

Explanation of the error:

Gearset may surface this Salesforce validation error when you've included Global Value Set metadata type in your metadata filter and, for example, you may be trying to deploy a picklist between two environments (e.g. Salesforce orgs).

This error type, Duplicate label <xxx> where <xxx> references a specific label name, is likely to occur during deployments when attempting to modify Global Picklist Value Sets by changing the API names of picklist values.

An example of the error in our app would look as below:

Resolution:

According to Salesforce documentation, you should consider this to be expected behavior.

When you deploy changes to picklist values via Metadata API, Salesforce looks at the picklist name as its unique identifier.

If you change the API name of a given picklist value (in your source environment), Salesforce will understand it as an attempt to create a new picklist value with a duplicate label (in the target org).

And because Salesforce recognizes that there is already a (picklist) value in the target org with the same label - the deployment attempt results in the above error.

So what should I do instead?
If you attempt to change only the picklist value's label, Salesforce will recognize the value based on its API name and successfully deploy the change to your target org.

For more information on this error, please refer to:
Salesforce Knowledge Articles

Disclaimer: This error is returned by Salesforce directly, rather than Gearset. Even so, we offer guidance based on our combined experience with the Metadata API. Where possible, we try to help guide you to fix or avoid this error. In the case that this isn't possible, we may need to direct you to Salesforce support for further clarification.

Did this answer your question?