+ Start a Discussion

Converting project from Metadata to SFDX with RecordType referencing GlobalValueSet causing reference error on push

hello everyone,

I converted my project from metadata to sfdx. When I push, I have this error 
Global Picklist 'GlobalValueSetName' is not allowed as record type picklist. Field name should be specified instead (8906:25)
Here is The RecordType Metadata from metadata API.
        <description>RecordType Description</description>
            <picklist>GlobalValueSetName</picklist> <!-- In SFDX I need to put here the field name for this to work. -->
I need to replace the GlobalValueSetName in the converted project with the associated CustomField Name before push. This is time consuming as there are many occurences. 

How to solve this issue?

Raj VakatiRaj Vakati
Change your package.xml as shown below and then retrieve it.  I dnt see any issues

sfdx force:mdapi:retrieve -r ./mdapipkg -u my-dev-org1 -k  C:\Users\rvakati\workspace\RajV\src\package.xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">

Raj VakatiRaj Vakati
User-added image
Xiukai NingXiukai Ning
Genoud, were you able to solve the problem? I'm experiencing the same issue, and couldn't get around it unless I replace the global value set name with the field name.