1

I'm trying to develop in a scratch org. When creating a scratch organization, specify the configuration file with a command to create a scratch org. After creating the scratch org, I noticed I forgot the features I needed. Is it possible to update only the diffs to an existing scratch org?

Wrong setting!

{
  "orgName": "applyapp",
  "edition": "Developer",
  "language": "en_US",
  "adminEmail": "XXXXXX",
  "features": ["Communities"],
  "settings": {
    "lightningExperienceSettings": {
      "enableS1DesktopEnabled": true
    },
    "securitySettings": {
      "passwordPolicies": {
        "enableSetPasswordInApi": true
      }
    },
    "mobileSettings": {
      "enableS1EncryptedStoragePref2": false
    },
    "communitiesSettings": {
      "enableNetworksEnabled": true
    }
  }
}

Need to update the following JSON to the existing scratch org.

{
  "orgName": "applyapp",
  "edition": "Developer",
  "language": "en_US",
  "adminEmail": "XXXXXX",
  "features": ["Communities", "PersonAccounts"],
  "settings": {
    "lightningExperienceSettings": {
      "enableS1DesktopEnabled": true
    },
    "securitySettings": {
      "passwordPolicies": {
        "enableSetPasswordInApi": true
      }
    },
    "mobileSettings": {
      "enableS1EncryptedStoragePref2": false
    },
    "communitiesSettings": {
      "enableNetworksEnabled": true
    }
  }
}
  • 3
    Given the temporary and throwaway nature of scratch orgs, it wouldn't surprise me if there is no way to modify org shape after creation. Is there a reason why you want to avoid just spinning up another scratch org? – Derek F Nov 26 '20 at 13:47
  • Thank you for your reply. I have 3 active scratch org allocation, 6 daily scratch org allocation for developer edition. If I can update the setting to the existing scratch org, I don't hit those limit. – Win Myint Oo Nov 26 '20 at 14:01
  • Also, once the source entered to the scratch organization, I think that it is troublesome to pull and push every time like this. – Win Myint Oo Nov 26 '20 at 14:01
3

It is not possible as of Winter 21 release to do this!

There are a couple of workarounds

  1. Manually enable those features and settings in the org and also modify these in your source control so next time one does not have to run these set up manually!

  2. Create a new scratch org. Make sure to pull everything from your current scratch org so you don’t lose any work!

    sfdx force:source pull

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.