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?

2

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.

  • That's great! thank you – TimChadwick Mar 19 at 12:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.