0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

WORK.COMを有効にしたScratch Orgを作成する

Last updated at Posted at 2025-04-01

Work.comは廃止されたためScratch Orgも作成できなくなってしまいました。。。
https://help.salesforce.com/s/articleView?id=000391089&type=1

事前準備

  1. DevHub組織を作成する
  2. DevHubを有効化
    • 「設定 > Dev Hub」の「Dev Hub を有効化」を有効にする
  3. 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
    }
  }
}

手順

  1. スクラッチオルグの作成
    • sf org create scratch -d -f config/project-scratch-def.json -a scratch_org_name
  2. スクラッチオルグユーザーのパスワードを生成する
    • sf org generate password
  3. WORK.COMインストールサイトにアクセスして、スクラッチオルグユーザーのID/PASSを入力し、必要なパッケージをインストールする

CLIでパッケージをインストールする方法
パッケージのインストール後にsf package installed listを実行することでPackage VersionIdを確認することができます。
このIDを使用してpackage installを実行することで、CLIからパッケージをインストールできます。
sf package install --package 04t4R000001lhpCQAQ

スクリーンショット 2025-04-01 11.48.10.png

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?