1

I am trying to create a new scratch org definition file that will turn on external sharing and enable middle name. However i get error messages and the documentation isn't great once you get down into nameSettings

I currrently am using to following settings

 "settings":{
    "orgPreferenceSettings":{
        "networksEnabled": true,
        "chatterEnabled": true,
        "enhancedEmailEnabled": true
    },
    "nameSettings":{
        "isMiddleNameEnabled": true
    }
  }

However this gives you the following error

Error shape/settings/Name.settings Name Error parsing file: Element {}isMiddleNameEnabled invalid at this location in type NameSettings

Anyone got a solution to this?

1 Answer 1

6

The key for this one is the snippet from the config file documentation:

When converting existing org prefs to settings, the org prefs that start with “Is” have a corresponding setting that starts with “enable”. For example, “IsOrdersEnabled” is “enableOrders” that takes a Boolean value of true or false.

So IsMiddleNameEnabled should map to enableMiddleName.

The documentation is a little unclear on Scratch Org Settings, in part because they're replacing an older DX nomenclature as well as mapping to Metadata API settings.

1
  • That's great! thank you Mar 19, 2019 at 12:13

You must log in to answer this question.

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