function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jolene C WhiteJolene C White 

Contract.Status standard value set causes error in deployment: 'Field:null is not a picklist'

The standard value set for Contract.Status causes an error 'Field:null is not a picklist'.   I am guessing this because the current structure for the standard value set doesn't contain a value for the StatusCode, which is required for every Contract.Status value.  Has anyone solved this issue?  Is it on the roadmap to be addressed?  Can we do anything other than put it into the .forceignore?
 
Here is a similar question: 
https://success.salesforce.com/_ui/core/chatter/groups/GroupProfilePage?g=0F93A000000HTp1SAG&fId=0D53A00003NmQ4cSAF
Best Answer chosen by Jolene C White
Jolene C WhiteJolene C White
We did try adding the statusCategory tag, but that didn't work.  We have a standard value set, but I believe this is a known issue that Salesforce has never fixed.    I've posted this in Ideas -- please vote!  https://success.salesforce.com/ideaView?id=0873A000000TzsWQAS

All Answers

mukesh guptamukesh gupta
Hi Jolene,

you need to set Same value of Contract Status picklist in production and senbox. if you have any issue, please let me know


if you fond this useful then, PLEASE MARK AS A BEST ANSWER!!


Regards
Mukesh

 
Jolene C WhiteJolene C White
Unfortunately that won't solve the issue, since this occurs when spinning up a scratch org through DX.  We need the scratch org to be created with these values in order for the attached processes to work correctly.  Adding these manually into a scratch org everytime is prone to error since many people will spin these up frequently.
Jos Vlaar 6Jos Vlaar 6
Hi Jolene, I'm having the same issue. I'm currently trying wether adding a <statusCategory> tag or something simliar will work. Have you tried adding such a tag yourself?
Jos Vlaar 6Jos Vlaar 6
This list of options indicates that there is no option to supply a category in any way. This is probably a bug in SFDX that needs to be fixed by Salesforce. https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_customvalue.htm#standardvalue 
Jolene C WhiteJolene C White
We did try adding the statusCategory tag, but that didn't work.  We have a standard value set, but I believe this is a known issue that Salesforce has never fixed.    I've posted this in Ideas -- please vote!  https://success.salesforce.com/ideaView?id=0873A000000TzsWQAS
This was selected as the best answer
Rennê Silva 6Rennê Silva 6
I was facing a similar problem to deploy this standard value set and I solved it by adding the groupingString tag to the xml. Here is my xml file working:
<?xml version="1.0" encoding="UTF-8"?>
<StandardValueSet xmlns="http://soap.sforce.com/2006/04/metadata">
    <sorted>false</sorted>
    <standardValue>
        <fullName>In Approval Process</fullName>
        <default>false</default>
        <label>In Approval Process</label>
        <groupingString>InApproval</groupingString>
    </standardValue>
    <standardValue>
        <fullName>Activated</fullName>
        <default>false</default>
        <label>Activated</label>
        <groupingString>Activated</groupingString>
    </standardValue>
    <standardValue>
        <fullName>Draft</fullName>
        <default>false</default>
        <label>Draft</label>
        <groupingString>Draft</groupingString>
    </standardValue>
    <standardValue>
        <fullName>Informações do Contrato</fullName>
        <default>false</default>
        <label>Informações do Contrato</label>
        <groupingString>Draft</groupingString>
    </standardValue>
    <standardValue>
        <fullName>Validação Cadastro</fullName>
        <default>false</default>
        <label>Validação Cadastro</label>
        <groupingString>Draft</groupingString>
    </standardValue>
    <standardValue>
        <fullName>Em Assinatura</fullName>
        <default>false</default>
        <label>Em Assinatura</label>
        <groupingString>InApproval</groupingString>
    </standardValue>
    <standardValue>
        <fullName>Contrato Assinado</fullName>
        <default>false</default>
        <label>Contrato Assinado</label>
        <groupingString>Activated</groupingString>
    </standardValue>
    <standardValue>
        <fullName>Contrato Cadastrado</fullName>
        <default>false</default>
        <label>Contrato Cadastrado</label>
        <groupingString>Activated</groupingString>
    </standardValue>
    <standardValue>
        <fullName>Cancelado</fullName>
        <default>false</default>
        <label>Cancelado</label>
        <groupingString>Draft</groupingString>
    </standardValue>
</StandardValueSet>