1

I have the following code:

<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>Some_Custom_Field__c</fullName>
    <description></description>
    <externalId>false</externalId>
    <label>Lead Property</label>
    <required>true</required>
    <trackHistory>true</trackHistory>
    <trackTrending>false</trackTrending>
    <type>Picklist</type>
    <valueSet>
        <controllingField>Test__c</controllingField>
        <restricted>true</restricted>
        <valueSetDefinition>
            <sorted>false</sorted>

            <value>
                <fullName>Some_New_Name__C</fullName>
                <default>false</default>
                <label>Some Label</label>
            </value>

        </valueSetDefinition>

        <valueSettings>
            <controllingFieldValue>Field_Comparison</controllingFieldValue>
            <valueName>Some_New_Name__c</valueName>
        </valueSettings>

    </valueSet>
</CustomField>

we are updating only the "fullName" in the picklist value. so when deploying that we get a "duplicate label" error because it thinks we have two picklist values with the same name

Our current fix is to manually delete the picklist value and then push in the metadata file above. However we would like to eliminate the manual step above.

One thing we can maybe do is to add a pre-destructive xml file and remove the field and then push it in but the concern there is that if that field is in use elsewhere we run into dependency problems.

Any tips?

Your Answer

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

Browse other questions tagged or ask your own question.