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
Baird StraughanBaird Straughan 

Can't deploy fieldsets with ANT?

I'm trying to deploy a build that includes a fieldsets.  In the package document I have tried to retrieve using:
 
<types>
        <members>MyFieldset</members> 
        <name>Fieldset</name>
</types>
and
<types>
        <members>Account.MyFieldset</members> 
        <name>Fieldset</name>
</types>
and
<types>
        <members>Account.fieldset.MyFieldset</members> 
        <name>Fieldset</name>
</types>

The rest of the package retrieve and deploys fine but when I include the code for fieldset I get this error:

Entity type: 'Fieldset' is unknown

Are fieldsets not deployable via ANT?  If that's the case, it should be documented somewhere.
Best Answer chosen by Baird Straughan
David BarreraDavid Barrera
Hi Baird,

Field sets are deployable via ANT and the metadata API. The problem is that all the terms in the package.xml are case sensitive.

try changing the "Fieldset" to "FieldSet":
 
<types>
        <members>Account.fieldset.MyFieldset</members> 
        <name>Fieldset</name>
</type>
to 
 
<types>
        <members>Account.fieldset.MyFieldset</members> 
        <name>FieldSet</name>
</types>

Hope that helps.

All Answers

David BarreraDavid Barrera
Hi Baird,

Field sets are deployable via ANT and the metadata API. The problem is that all the terms in the package.xml are case sensitive.

try changing the "Fieldset" to "FieldSet":
 
<types>
        <members>Account.fieldset.MyFieldset</members> 
        <name>Fieldset</name>
</type>
to 
 
<types>
        <members>Account.fieldset.MyFieldset</members> 
        <name>FieldSet</name>
</types>

Hope that helps.
This was selected as the best answer
Baird StraughanBaird Straughan
Thanks David.  You're right.  The name is case sensitive, FieldSet.

But my code still has an error in it.  The first line should be just "Contact.MyFieldset."  What works is:
 
<types>
        <members>Account.MyFieldset</members> 
        <name><b>FieldSet</b></name>
</types>
Thanks for the help.
 
Jheel D. AgrawalJheel D. Agrawal
Hi All,

In my latest check, I used the following to get the field set:
    <types>
        <members>Lead.Sample_Lead_FieldSet</members> 
        <name>FieldSet</name>
    </type>
It doesn't matter if you write "FieldSet" or "Fieldset". SFDX CLI works with both. You just have to put the
</members>ObjectName.FieldSetAPIName</members>

Hope this helps.
 
Baird StraughanBaird Straughan
Thanks, Jheel! That's what I needed to know. Baird Straughan 301-775-5944 Organizing is 90% reminder calls.