Skip to main content
Gruppe

Org Shape for Scratch Orgs

Welcome to the Org Shape for Scratch Orgs! We are now in beta, so everyone can now use org shape. If you’re already familiar with Salesforce DX, you know the power of scratch orgs--they are empty, ephemeral, and are easy to spin up. Currently, you need to know which features and settings you want to configure in your scratch org. These features and settings, along with licenses comprise your org’s shape. With this feature, you no longer need to individually list out all the org settings and features in your scratch org definition file. With one simple command, you can spin up a scratch org with the pilot-enabled production org’s shape. This. Changes. Everything. We look forward to your feedback on this new feature. Tell us what you think.

Is it normal for "shaped" scratch orgs to be trial orgs?

 

I've reproduced this several times over several days.

  1. I created an org shape.  (org:shape:create)
  2. I copied the org id into my scratch org definition file.
  3. I created a scratch org with that file.  (org:create)
  4. I opened the scratch org.  (org:open)
  5. I see a banner across the top of the page, and on the right side it says "Days left in trial 30 Subscribe Now".

 

I haven't seen that banner on non-shaped scratch orgs.

3 Kommentare
0/9000

Any ideas on this error? 

 

"The request to create a scratch org failed with error code: SH-9999."

3 Antworten
  1. 12. Dez. 2024, 20:53

    If you haven't already done so, there are a couple of one-time things you have to do in Setup on the source org.  Under Development:Scratch Orgs.  You have to turn on the " Enable Org Shape for Scratch Orgs" option, and you have to put the dev hub's org ID in the permissions text box below that.  (You have to do that even if the dev hub is the same as the source org.)

0/9000

Speed Up Package Development with Scratch Org Snapshots

 

@Rohit Mehta and I are excited to talk to you about how you can leverage Scratch Org Snapshots to speed-up your Package Builds. Join us for an info-packed session at Dreamforce. We will do this, not once but twice! Here are the details:

 

Session Code: 5743

Session Title: Speed Up Package Development with Scratch Org Snapshots

Session Type: Theater

Schedule: 9/17/2024, 8:30 AM - 8:50 AM, Moscone West, L1 Forest, Developer Theater

Schedule: 9/19/2024, 9:00 AM - 9:20 AM, Moscone West, L2, Room 2000

 

Hope you see you there!

@Org Shape for Scratch Orgs @Scratch Org Snapshots

2 Kommentare
  1. 23. Sept. 2024, 16:45

    Thanks @Phil W for creating the Idea. I will see what we can do here, and will come back to you if I have any questions.

0/9000

Has anyone seen the following error when trying to create an Org Shape from Production?

 

ERROR running force:org:shape:create:  sObject type 'DevHubSettings' is not supported.

4 Kommentare
  1. 4. Sept. 2024, 09:42

    Old post but having the same issue today.

    Having DevHub org set up for org shape creation.

    Issuing:

    sf org create shape --target-org SWDevHub

    with SWDevHub being the Dev Hub alias.

     

    The error returned is:

    Error (1): sObject type 'DevHubSettings' is not supported.
0/9000

We are forced to use org shape to create scratch orgs due to license limits. (unlimited license vs enterprise license)

 

The customer uses experience bundles, which can't be deployed to the scratch org due to a known issue:

 

Can't create a Digital Experience Cloud Site Using Org Shape

Description: When you try to create a scratch org from an org shape that contains an Experience Cloud Site, you get an error.

Required fields are missing: [Welcome Email Template, Change Password Email Template, Lost Password Template]

Workaround: None.

 

What would be the recommended way in managing this?

 

1. Redesign to stay within enterprise limits

2. Use sandboxes instead of scratch orgs

3. Split functionality into packages and use different setups for different functionality

 

They all seam like sub optimal options. Is there still work done on the known issues? Feels like a big issue not being able to use experience bundles.

1 Antwort
0/9000

So I get that we have to recreate the Org Shape after the Summer24 upgrade. 

 

When I run a query against the ShapeRepresentation table, I see multiple records that are status: Inactive and I see one record that is status: Active.  

 

Why is that??

 

I assume that the single Active record is the one that is obsolete and needs to be recreated.  I assume that when I run the command to recreate the ShapeRepresentation, it will actually make a new ShapeRepresentation record and set the current "Active" record to Inactive.

 

Is it an issue to keep these Inactive ShapeRepresentation records around?

Is there value in keeping those Inactive ShapeRepresentation records?

Why not simply delete the old records?

 

Any thoughts on this??

3 Antworten
  1. 1. Juli 2024, 20:04

    @John Daniel - My hunch is that this is not deleted as it is end-user data. Your point is valid that we should delete it when the shape becomes unusable. Something that we should prioritize. sf org delete shape command is useful till we deliver on this.

0/9000

Since the summer release has went through I have gotten an error when creating scratch orgs. The error is below.

 

I have org shape enabled and have created a new shape multiple times since the release. 

 

I use CumulusCI for all of my SFDX work and the command I have been using to create scratch orgs is:

sfdx force:org:create --json -f orgs/dev.json -w 120 -n --durationdays 7 -a SF-GRSO__dev adminEmail=lind1207@umn.edu

 

{  "code": 1,  "actions": [    "See https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_scratch_orgs_error_codes.htm for information on error code C-9999."  ],  "context": "Create",  "commandName": "Create",  "data": {    "username": "lind1207@umn.edu.grso",    "orgId": "00D1I000001Y4P3UAK",    "scratchOrgInfoId": "2SRPK0000002wsj4AA"  },  "message": "A fatal signup error occurred. Please try again. If you still see this error, contact Salesforce Support for assistance",  "name": "RemoteOrgSignupFailed",  "status": 1,  "stack": "RemoteOrgSignupFailed: A fatal signup error occurred. Please try again. If you still see this error, contact Salesforce Support for assistance\n    at checkScratchOrgInfoForErrors (C:\\Users\\lind1207\\AppData\\Local\\sf\\client\\2.46.6-191291b\\node_modules\\@salesforce\\core\\lib\\org\\scratchOrgErrorCodes.js:63:19)\n    at async pollForScratchOrgInfo (C:\\Users\\lind1207\\AppData\\Local\\sf\\client\\2.46.6-191291b\\node_modules\\@salesforce\\core\\lib\\org\\scratchOrgInfoApi.js:310:16)\n    at async scratchOrgCreate (C:\\Users\\lind1207\\AppData\\Local\\sf\\client\\2.46.6-191291b\\node_modules\\@salesforce\\core\\lib\\org\\scratchOrgCreate.js:171:17)\n    at async Create.createScratchOrg (file:///C:/Users/lind1207/AppData/Local/sf/client/2.46.6-191291b/node_modules/@salesforce/plugin-org/lib/commands/force/org/create.js:216:68)\n    at async Create._run (C:\\Users\\lind1207\\AppData\\Local\\sf\\client\\2.46.6-191291b\\node_modules\\@oclif\\core\\lib\\command.js:302:22)\n    at async Config.runCommand (C:\\Users\\lind1207\\AppData\\Local\\sf\\client\\2.46.6-191291b\\node_modules\\@oclif\\core\\lib\\config\\config.js:424:25)\n    at async run (C:\\Users\\lind1207\\AppData\\Local\\sf\\client\\2.46.6-191291b\\node_modules\\@oclif\\core\\lib\\main.js:94:16)\n    at async file:///C:/Users/lind1207/AppData/Local/sf/client/2.46.6-191291b/bin/run.js:15:1",  "exitCode": 1,  "warnings": [    "The force:org:create command is deprecated. Try \"org create scratch\" or \"org create sandbox\" instead.",    "Record types defined in the scratch org definition file will stop being capitalized by default in a future release.\nSet the `org-capitalize-record-types` config var to `true` to enforce capitalization."     ]}
2 Antworten
0/9000

Created an org shape form production which is person account enabled. However, the scratch org created from the org shape doesn't enable person account. Adding person account enabled feature is not working as well.. any pointer?

3 Kommentare
  1. 6. Mai 2024, 22:07

    In case anyone else comes across this, it appears that the "PeronAccounts" feature is now working when used alongside a sourceOrg (org shape), but it does need to be in the sfdx-project.json file explicitly:

     

    {

      "orgName": "salesforce-fsc - Dev Org",

      "sourceOrg": "<org-id-for-production-org-shape-org>",

      "features": ["PersonAccounts"]

    }

     

    In case anyone else comes across this, it appears that the

     

    Screenshot 2024-05-06 at 3.04.10 PM.png

0/9000

Scratch Org Definition

 

{

"orgName":"OrgName",

"edition":"Developer",

"features":[

"AuthorApex",

"Communities",

"EnableSetPasswordInApi",

"FieldAuditTrail",

"StateAndCountryPicklist"

],

"settings":{

"accountSettings":{

"enableAccountHistoryTracking":true,

"enableContactHistoryTracking":true

},

"communitiesSettings":{

"enableNetworksEnabled":true

},

"currencySettings":{

"enableMultiCurrency":true

},

"opportunitySettings":{

"enableOpportunityFieldHistoryTracking":true

},

"languageSettings":{

"enableTranslationWorkbench":true,

"enableEndUserLanguages":true

},

"lightningExperienceSettings":{

"enableS1DesktopEnabled":true

},

"securitySettings":{

"enableAdminLoginAsAnyUser":true

},

"sharingSettings":{

"enableExternalSharingModel":true

},

"liveAgentSettings":{

"enableLiveAgent":true

},

"apexSettings":{

"enableApexApprovalLockUnlock":true

}

},

"objectSettings":{

"case":{

"sharingModel":"private"

},

"opportunity":{

"sharingModel":"read"

}

}

}

Error Message

 

{

"code": 1,

"actions": [

"See https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_scratch_orgs_error_codes.htm for information on error code C-9999."

],

"context": "EnvCreateScratch",

"commandName": "EnvCreateScratch",

"data": {

"username": "*******",

"orgId": "00D90000000XXXXXXX",

"scratchOrgInfoId": "2SR7T000000XXXXXXX"

},

"message": "A fatal signup error occurred. Please try again. If you still see this error, contact Salesforce Support for assistance",

"name": "RemoteOrgSignupFailed",

"status": 1,

"stack": "RemoteOrgSignupFailed: A fatal signup error occurred. Please try again. If you still see this error, contact Salesforce Support for assistance\n

...

"exitCode": 1,

"warnings": [

"Record types defined in the scratch org definition file will stop being capitalized by default in a future release.\nSet the `org-capitalize-record-types` config var to `true` to enforce capitalization."

]

}

14 Antworten
0/9000

I'm not able to create a scratch org anymore, getting the error: "A fatal signup error occurred. Please try again. If you still see this error, contact Salesforce Support for assistance.", and error code C-9999.

 

I tried recreating the shape at least 5 times but I'm still having the same error. Our org id is 00D46000000ZOHT.

 

Any idea on what could be wrong ?

42 Kommentare
0/9000