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:
![image](https://private-user-images.githubusercontent.com/11257110/306023168-4eb0c527-5b1d-490b-b196-60f624bf0d66.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3MjY1NTYsIm5iZiI6MTcyNDcyNjI1NiwicGF0aCI6Ii8xMTI1NzExMC8zMDYwMjMxNjgtNGViMGM1MjctNWIxZC00OTBiLWIxOTYtNjBmNjI0YmYwZDY2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI3VDAyMzczNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQzMmQ1NTQ4YmUwYWNlMjllNDBlZmNkODkwOWE2N2JkYjc3Y2ZlMWVhMjAxMzZiNjM0YzY2Mjk5MTkyMzUwNGEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.2xjTbeFCB6tdY-vbIz-bbIRbGbW7G42XLGATSVNhnUk)
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:
![image](https://private-user-images.githubusercontent.com/11257110/306023940-06b78998-fec9-4511-92ee-22bd1c1f86f9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3MjY1NTYsIm5iZiI6MTcyNDcyNjI1NiwicGF0aCI6Ii8xMTI1NzExMC8zMDYwMjM5NDAtMDZiNzg5OTgtZmVjOS00NTExLTkyZWUtMjJiZDFjMWY4NmY5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI3VDAyMzczNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQwNDZjODkwOTI3ZmFkOGExM2I2YmNmOTU4Zjg4MWRlNDJmMGIyZjJmOWMzM2Q1N2MwOTZkNDhjYjllZTVmMjgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.NlVD5R_0wSCs4KX7II0dNUPAl_td2nFVzONywCAM5I0)
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:
![image](https://private-user-images.githubusercontent.com/11257110/306020178-16229afe-b9d4-43ce-8072-bd0f0ab8b621.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3MjY1NTYsIm5iZiI6MTcyNDcyNjI1NiwicGF0aCI6Ii8xMTI1NzExMC8zMDYwMjAxNzgtMTYyMjlhZmUtYjlkNC00M2NlLTgwNzItYmQwZjBhYjhiNjIxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI3VDAyMzczNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQ5YWFjMzYzMWIxMjU5MDJhOWYwMzUwMTUzZWJiMmFlOGE3ZWIwMmJlM2NlOGE3YjExNmZlMDRhN2EwNzU1ZWMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.bfcKbFG6plyyXMhwPWQvgVsi0n8QezUrTCfzcWW2hQI)
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: