Retrieve custom fields from standard objects using sfdx force:source:retrieve

How can I retrieve custom fields from standard objects using:

sfdx force:source:retrieve -m

I tried using CustomField to no avail.

I am trying to pull the custom fields I have added from a non-tracked org (i.e. a non-scratch org) that only supports MDAPI directly into the newer SFDX format.


This syntax was what I needed

sfdx force:source:retrieve -m CustomField:Claim.CveClaim__c

to retrieve my custom field CveClaim__c that I added to the (standard in FSC object) Claim. The -m CustomObject:Account will pull back all the fields of that object – standard and custom.

Source : Link , Question Author : dzh , Answer Author : Keith C

Leave a Comment