I created a scratch org, and I plan to deploy a basic schema to it. Being rather new to sfdx, I first run a sfdx project deploy preview, and the cli outputs me the weirdest thing: it seems to interpret the customFields as EmailServicesFunctions.

here is what my directory structure looks like. There is 4 folders; custom and standard objects, CMDTs, and custom settings. You can see the output of the command in the terminal:

directory structure

Some context/things to consider:

  1. The files appears to be in proper source format, as I have folders corresponding to the objects, and subfolders for their fields (vs mdapi where the objects are a single chunk with everything in it).
  2. The source comes from a gearset commit, from our SF org.
  3. CustomObject type is recognized properly
  4. somehow CompactLayout is also a EmailServicesFunctions (refer to image)
  5. updated my plugin to sfdx-cli/7.198.7 win32-x64 node-v18.15.0 (in case that matters)
  6. doing a sfdx project deploy start results in: Error (1): Component conversion failed: ENOENT: no such file or directory, stat 'C:.forceignore' (adding to the mystery)

I would love to know why sfdx is not recognizing the CustomFields and telling me they are EmailServicesFunctions. To me this does not make any sense.

  • I've never seen anyone try to store standard or custom objects in the structure you have. AFAIK, you need to call the folder "objects", not "schema". I'm also not convinced you can have a sub-folder below that to split standard and custom objects. I'd expect to see something more like onyxtech/main/default/objects/ with both standard and custom objects below.
    – Phil W
    Apr 28, 2023 at 8:00
  • There's no need to split them, IMHO, since you can easily distinguish the two - standard object folders never end with "__c" but custom object folders always do. However, you could split to onyxtech/main/standard/objects and onyxtech/main/custom/objects.
    – Phil W
    Apr 28, 2023 at 8:02
  • @Phil W It's a template I started with: github.com/sfdx-isv/sfdx-falcon-template. But I noticed now that I modified it in a way where I have no folder(s) called 'objects'. Thanks for giving me some clue to pursue.
    – Werlin
    Apr 28, 2023 at 17:45

1 Answer 1


The problem was that the objects were not in folders called specifically "objects". Looks like it confuses sfdx if we proceed otherwise.

I'm sure that that's the case for all metadata types; Apex classes needs to go in a folder called "classes", etc.

After creating subfolders named "objects" and moving my metadata in there, all checks out fine, and sfdx recognize the right types :

enter image description here

Shout out to Phil W for pointing me in the right direction!

You must log in to answer this question.

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