Work.comは廃止されたためScratch Orgも作成できなくなってしまいました。。。
https://help.salesforce.com/s/articleView?id=000391089&type=1
事前準備
- DevHub組織を作成する
- Developer Edisionもしくは本番環境を用意
- DevHubを有効化
- 「設定 > Dev Hub」の「Dev Hub を有効化」を有効にする
- Salesforceプロジェクトフォルダのスクラッチ組織定義ファイル(
config/project-scratch-def.json
)を編集する
スクラッチ組織定義ファイルの例
project-scratch-def.json
{
"orgName": "Document System App",
"country": "JP",
"edition": "Enterprise",
"language": "ja",
"features": [
"Communities",
"EnableSetPasswordInApi",
"PersonAccounts",
"WorkplaceCommandCenterUser",
"ForceComPlatform"
],
"settings": {
"communitiesSettings": {
"enableNetworksEnabled": true
},
"experienceBundleSettings": {
"enableExperienceBundleMetadata": true
},
"languageSettings": {
"enableTranslationWorkbench": true,
"enableEndUserLanguages": true
},
"lightningExperienceSettings": {
"enableS1DesktopEnabled": true
},
"mobileSettings": {
"enableS1EncryptedStoragePref2": false
},
"surveySettings": {
"enableSurvey": true
}
}
}
手順
- スクラッチオルグの作成
sf org create scratch -d -f config/project-scratch-def.json -a scratch_org_name
- スクラッチオルグユーザーのパスワードを生成する
sf org generate password
- WORK.COMインストールサイトにアクセスして、スクラッチオルグユーザーのID/PASSを入力し、必要なパッケージをインストールする