0

I got this error when creating package version (1) Create_New_Order: Custom Object Definition ID: bad value for restricted picklist field: MOrder__c

<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>Status__c</fullName>
    <defaultValue>&quot;Draft&quot;</defaultValue>
    <externalId>false</externalId>
    <label>Status</label>
    <required>true</required>
    <trackTrending>false</trackTrending>
    <type>Picklist</type>
    <valueSet>
        <restricted>true</restricted>
        <valueSetDefinition>
            <sorted>false</sorted>
            <value>
                <fullName>Draft</fullName>
                <default>false</default>
                <label>Draft</label>
            </value>
            <value>
                <fullName>Submitted</fullName>
                <default>false</default>
                <label>Submitted</label>
            </value>
        </valueSetDefinition>
    </valueSet>
</CustomField>

Create_New_Order

<?xml version="1.0" encoding="UTF-8"?>
<AnimationRule xmlns="http://soap.sforce.com/2006/04/metadata">
    <animationFrequency>rarely</animationFrequency>
    <developerName>Create_New_Order</developerName>
    <isActive>true</isActive>
    <masterLabel>Create New Order</masterLabel>
    <recordTypeContext>Master</recordTypeContext>
    <recordTypeName>__MASTER__</recordTypeName>
    <sobjectType>MOrder__c</sobjectType>
    <targetField>Status__c</targetField>
    <targetFieldChangeToValues>Draft</targetFieldChangeToValues>
</AnimationRule>

<?xml version="1.0" encoding="UTF-8"?>
<PathAssistant xmlns="http://soap.sforce.com/2006/04/metadata">
    <active>true</active>
    <entityName>MOrder__c</entityName>
    <fieldName>Status__c</fieldName>
    <masterLabel>Create New Order</masterLabel>
    <pathAssistantSteps>
        <info>&lt;p&gt;Please select all your products, check the billings and click submit&lt;/p&gt;</info>
        <picklistValueName>Draft</picklistValueName>
    </pathAssistantSteps>
    <pathAssistantSteps>
        <info>&lt;p&gt;Your order is now submitted&lt;/p&gt;</info>
        <picklistValueName>Submitted</picklistValueName>
    </pathAssistantSteps>
    <recordTypeName>__MASTER__</recordTypeName>
</PathAssistant>

I already tried to

  • remove <defaultValue>&quot;Draft&quot;</defaultValue>
  • set restricted=false

But it won't help, actually I have no clue what is happening.

3

0

You must log in to answer this question.

Browse other questions tagged .