How do i retrieve metadata, as .object files? Currently what i do is:

  1. use workbench or Package xml Generator to create a package.xml like this
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">

then this command retrieves the data:

sfdx project retrieve start -c  -x .\manifest\package.xml

but instead of a single .object file for each object, it returns an hierarchical folder structure, with a file for every field definition. But what i need is the .object file, with a path like force-app\main\default\objects\HFS_Features__mdt.object

enter image description here

Actually, that file is here, but as soon as i retrieve it from the org it becomes as below, with the field definitions going to that file structure

<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
    <label>HFS Features</label>
    <pluralLabel>HFS Features</pluralLabel>

So, i do need those .object files, because our deployment process requires them for deployment. Any clue on how to get them?

1 Answer 1


The new format you're experiencing is called "source format." This is a friendlier file format than the older monolithic file. However, if you still need it, sf project convert source can convert the new style format into the older format, which you can then use for deployment. Realistically, it'd be better to update your deployment process to support the newer source format, as this is the intended path forward.

  • That was the solution, many thanks! As for updating the process, that above my paygrade, though i believe you are also correct. But now, why i had this issue and not my colleagues? Could they have a different <version>55.0</version> in package.xml? Gonna ask tomorrow Jun 18 at 18:01
  • nope, same as me. And we all did sfdx update. Mystery... Jun 23 at 10:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .