All Collections
Troubleshooting
Salesforce Validation Errors
Resolving Validation Errors - "Field: field, value <xxx> appears more than once"
Resolving Validation Errors - "Field: field, value <xxx> appears more than once"

Cause and solution for this Salesforce validation or deployment error

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

Explanation of the error:

This Salesforce error that Gearset is surfacing occurs when there is a duplicated field value detected in the metadata component you're deploying to the target.
​


In this example the error happened on a PR (Pull Request) validation within Pipelines.

Resolution:

To resolve this issue, first identify the duplicated field value referenced as "<xxx>" within the error's message - in this example it is Estimated_Resolution_Date__c (as shown on the above screenshot).
​

Next step is to edit the XML file of a failing metadata component (in this example it is Problem-Systems component) using VS Code, or a similar XML editor, and remove one of the duplicated fields from the XML.

Note that you cannot edit the XML file directly in Gearset.
​
If the issue happens on a PR validation, you can edit the XML file of the failing component directly within the PR in your Version Control System, and then re-try to validate and merge the PR.
​
Alternatively, you can edit the XML file of the failing component directly in your feature branch, remove the duplicated field, and proceed with re-creating your PR.

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?