2

I've added several values to the new UserTerritory2Association.RoleInTerritory2 picklist. I tried to deploy the field using Salesforce Migration Tool:

<types>
    <members>UserTerritory2Association.RoleInTerritory2</members>
    <name>CustomField</name>
</types>    

At first, it retrieved the field, but left the picklist values behind, so I manually modified the XML an added the values.

However, I get the following error:

All Component Failures:
1.  objects/UserTerritory2Association.object (UserTerritory2Association.RoleInTerritory2) -- Error: To modify a Standard Picklist, use Standard Value Set instead.

From the message, I presume I am being told to use the new Picklist Value Sets feature, however it doesn't appear this features works for standardized picklists, or at least this standard picklist.

Is it possible to deploy customer UserTerritory2Association.RoleInTerritory2 picklist values, and if so, how?

2 Answers 2

2

As of v39.0 these can be retrieved/deployed as Standard Value Sets.

RoleInTerritory2 does not appear in the docs but it still works alright:

package.xml

<Package>
    <types>
        <members>RoleInTerritory2</members>
        <name>StandardValueSet</name>
    </types>
    <version>39.0</version>
</Package>

role

RoleInTerritory2.standardValueSet

<?xml version="1.0" encoding="UTF-8"?>
<StandardValueSet xmlns="http://soap.sforce.com/2006/04/metadata">
    <sorted>false</sorted>
    <standardValue>
        <fullName>SR</fullName>
        <default>false</default>
        <label>Sales Representative</label>
    </standardValue>
</StandardValueSet>

It will appear in due course, Appendix C of the Metadata API Developer Guide

3

Starting with version 38.0, you should be able to deploy most standard picklist fields using the "StandardFieldSet" metadata type. However, in the list of standard picklist values that are supported, RoleInTerritory2 does not appear (https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/standardvalueset_names.htm)

Try changing your package version to 37.0 and re-running your original deploy.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.