Localized scratch orgs with defaultRecordTypes are only partially created since 60.0 #2731
Labels
owned by another team
The Salesforce CLI team does not own this work but will pass on the information to the correct team.
validated
Version information for this issue has been validated
Summary
This is a combination of 2 problems. We've had to combine them into one issue because we're unaware of any way to easily and reliably replicate the second part of the issue (org alias not being set on a partially created scratch org) other than with the first part of the issue.
Generating a scratch org using language & country NL with a
defaultRecordType
configured for Opportunity breaks the 'Deploy Settings' step of the scratch org creation process, leaving the scratch org in a state where it has been created and is accessible, but hasn't been fully configured.As the scratch org generation process only partially succeeds, the org alias that was declared for the scratch org doesn't get assigned to said scratch org.
Steps To Reproduce
Unable to provide our company's private repo, but this bug has seemed consistently replicable through the steps below.
sf project generate
sf org create scratch --alias "any-alias" --definition-file ./config/project-scratch-def.json --target-dev-hub "any-dev-hub" --wait 15 --track-source
Expected result
--alias
should be assigned as the alias of the scratch org.Actual result
sf org open
through using the scratch org's username--alias
is not assigned as alias to the scratch org. Since the creation of the scratch org was a partial success and the org is reachable, we would've expected the alias to have been set.System Information
Problem has occurred on multiple shells we've used (bash, cmd)
Additional information
Various things we've already investigated and tried:
--release previous
."language": "de_DE"
and"country": "DE"
)"edition": "Developer"
, but does on "edition": "Enterprise", as well as when using an 'Unlimited' edition Dev Hub as org shape.defaultRecordType
for Opportunity the org gets created fully. However, the things noted in our hypothesis below still apply to that fully created scratch org as well, indicating that simply not having a default Record Type likely doesn't actually solve the underlying root issue.Our hypothesis:
From looking into the partially created scratch orgs, the problem seems to lie specifically on Opportunity field StageName.
The labels and API values have all been translated to the language/country specified in the project-scratch-def:
On any other standard picklists, the labels were translated, but API values remained in English:
Note that in orgs generated on API 59.0 with identical settings, neither the labels nor (in case of Opportunity's StageName) API values for standard picklist were translated on creation of the scratch org. Both labels & API values were all in English.
Screenshot of the failed deployment in the generated scratch org:
Known bypass for people experiencing this problem:
For anyone experiencing this same issue, we were able to bypass this issue by making the following adjustments to our pipeline:
defaultRecordType
for Opportunity from our project-def-scratch.json fileOpportunityStage
standardValueSet containing the standard English API values that you'd normally get out-of-the-box on any EN scratch org (Prospecting, Qualification, etc.).The text was updated successfully, but these errors were encountered: