Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
スクラッチ組織活用術 Salesforce Developers Meetup #24
Search
omiend
November 13, 2020
Technology
1.4k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
スクラッチ組織活用術 Salesforce Developers Meetup #24
スクラッチ組織活用術
Salesforce Developers Meetup #24
omiend
November 13, 2020
More Decks by omiend
See All by omiend
Nuxt.jsのComponent分割単位と,SSRをする上で気をつけること
omiend
1
820
Nuxt.js_Vue.js_のVuexの動かしかたをまとめてみたよ.pdf
omiend
0
120
20181208_好きだけじゃツライScala.js_共有版_.pdf
omiend
0
130
20181110 Scala関西Summit 懇親会LT「Scalaのかわいいところ」
omiend
0
600
Other Decks in Technology
See All in Technology
Google Cloud Next Tokyo 26登壇時のスクリプト
recruitengineers
PRO
0
200
並行性の問題を防げ!実践トランザクション入門
occhi
0
280
AI時代に必要な脅威モデリング― 変化の速度に負けない理解とリスク判断
masakane55
4
1.1k
生成AIで高い生産性を求められて、 悩み、乗り越えた話
mot_techtalk
2
130
【データ横丁主催】AI Agentがコンテキストを使って仕事をした後、何が残るのか― 組織の経験を次の判断に引き継ぐ「Agent Memory」
shisyu_gaku
2
330
The seven pitfalls of AI (revised version)
ufried
0
280
自分で立ててみるLLMサービス
y_sera15
0
130
おそらく日本で唯一のDevRelインターン生として
husengs7
0
170
AI時代のAPI開発を加速する品質ガードレール / API Quality Guardrails in the AI Era
yokawasa
0
160
[AWS 秋のクラウドオペレーション祭り 2026]AWS DevOps Agentで変わるリリースと運用対応 ~リリース管理機能と Directed actions のご紹介~
furuton
4
1k
Incremental HTTP
kazuho
5
2.1k
オブザーバビリティを高める AI エージェント体験を考える / Designing AI Agent Experiences That Enhance Observability
aoto
PRO
2
310
Featured
See All Featured
Deep Space Network (abreviated)
tonyrice
0
360
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
2
6.3k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
580
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.1k
How to Ace a Technical Interview
jacobian
280
24k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
550
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
270
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
400
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
610
Transcript
アルプ株式会社 @omiend スクラッチ組織活用術 Salesforce Developers Meetup #24
自己紹介 オミ@omiend 仕事: アルプ株式会社。 Scala が好き。 Salesforce は2011年~2015年に Force.com を中心に開発。
1月にアルプへ入社して、5年ぶりの Salesforce 開発。 浦島太郎状態。 趣味: ジョギング、ウォーキング、映画、音楽
Scalebase - アルプ株式会社
Scalebase Connect for Salesforce
alp.connpass.com 2020年12月11日(金) 19:00 ~ 田中宏樹さま - 株式会社セールスフォース・ドットコム Salesforce の最新の開発事情 相野谷直樹さま
- アルプ株式会社 Modern Salesforce CI pattern (ただし第1世代パッケージ管理)(仮) 木村篤彦さま - 株式会社co-meeting Salesforce連携アプリ開発パターン(仮) 松田淳司さま - 株式会社ZAICO はじめてのAppExchange ~ZAICO for Salesforceのリリースに挑む ~ SaaS * Salesforce Developers Winter 2020
スクラッチ組織活用術
課題
課題 Salesforce開発は、組織がどんどん増えていく - 本番環境、Sandbox環境*n 用途の為に都度Sandbox環境を作る運用は結構つらい - 作成がちょっと煩雑 - 管理も職人芸になっていく -
メンテ漏れ 自分だけの開発環境が欲しい スクラッチ組織というとても便利な物がある - DevHub組織さえ有効化すればOK
スクラッチ組織を作成する
スクラッチ組織の作成 $ sfdx force:auth:web:login -d -a DevHub $ sfdx force:alias:list
=== Alias List Alias Value ──────────── ────────────────────────── DevHub
[email protected]
$ sfdx force:org:create \ -f ./config/project-scratch-def.json \ --setdefaultusername \ -a
MyScratchOrg \ --targetdevhubusername DevHub \ --durationdays 30 スクラッチ組織の作成
$ sfdx force:org:create \ -f ./config/project-scratch-def.json \ --setdefaultusername \ -a
MyScratchOrg \ --targetdevhubusername DevHub \ --durationdays 30 スクラッチ組織の作成
スクラッチ組織の作成 { "edition": "Developer", "orgName": "SomeOrgName", "adminEmail": "
[email protected]
", "username": "
[email protected]
",
"features": ["API"] } .project/config/sample-project-scratch-def.json
ソースコードをデプロイする
sfdx force:source:deploy \ -u MyScratchOrg -m ApexClass,... ソースコードをデプロイする
テストデータを作成する
テストデータを作成する $ sfdx force:data:tree:import \ -p .project/data/Account-plan.json \ -u MyScratchOrg
$ sfdx force:data:tree:import \ -p .project/data/Account-plan.json \ -u MyScratchOrg テストデータを作成する
[ { "sobject": "Account", "saveRefs": true, "resolveRefs": false, "files": [
"Accounts.json" ] } ] テストデータを作成する
{ "records": [ { "attributes": { "type": "Account", "referenceId": "A"
}, "Name": "アルプ株式会社 ", "BillingPostalCode": "1086022", "BillingCountry": "日本", "BillingState": "東京都", "BillingCity": "港区", "BillingStreet": "港南 2-15-1 品川インターシティA棟 22階 SPROUND", "ShippingPostalCode": "1086022", "ShippingCountry": "日本", "ShippingState": "東京都", "ShippingCity": "港区", "ShippingStreet": "港南 2-15-1 品川インターシティA棟 22階 SPROUND" } ] } テストデータを作成する
標準ユーザーを作る
$ sfdx force:user:create \ --setalias StandardUser \ --definitionfile ./config/project-scratch-standart-user-def.json 標準ユーザーを作る
$ sfdx force:user:create \ --setalias StandardUser \ --definitionfile ./config/project-scratch-standart-user-def.json 標準ユーザーを作る
標準ユーザーを作る { "Username": "
[email protected]
", "LastName": "Standard", "Email": "
[email protected]
", "profileName": "標準ユーザ",
"generatePassword": true } .project/config/sample-project-scratch-standard-user-def.json
スクラッチ組織に ログインする
$ sfdx force:org:open -u MyScratchOrg $ sfdx force:org:open -u StandartUser
スクラッチ組織にログインする
パスワードを作成する
$ sfdx force:user:password:generate -u MyScratchOrg Successfully set the password "qwerty"
for user
[email protected]
. パスワードを作成する
作成したユーザーの 詳細を参照する
$ sfdx force:user:display -u MyScratchOrg 作成したユーザーの詳細を参照する
など など etc etc
コマンドをたくさん 叩くのがつらい!
sfdx コマンドは shell に組み込める
勝ったな
スクラッチ組織の作成
注意点 - 名前空間を利用している場合、スクラッチ組 織作成時の設定ファイルで指定してあげる 必要がある( "namespace": "hoge", )。 - スクラッチ組織作成時のユーザー名は、一意
になるように、都度書き換える必要がある。 - テストデータを作成する際、一意の値は都度 書き換える必要がある(Account.Name に 指定する値など)。
Salesforce Winter '21
Salesforce Winter ‘21 releasenotes.docs.salesforce.com/ja-jp/winter21/release-notes/rn_forcecom_development.htm
- 弊社のプロダクトは主にAppExchangeのパッケージ 開発。 - ソースコードはGitHub管理しており、第2世代パッ ケージ管理を目指している(まだ対応できていない)。 - パッケージ作成を行う組織(一般的には SourceOrg?)のシェイプを作成し、そこからスクラッ チ組織を作成するみたいな機能かと思うが、上記の
点でマッチしなかった。 - ズビバゼン Salesforce Winter ‘21
より快適な スクラッチ組織ライフ を目指して
Scalebase Connect for Salesforce - GitHub Actions にてスクラッチ 組織を作成し、テストを実行 -
この辺は弊社主催の「SaaS * Salesforce Winter 2020」にて ご紹介できるかも
alp.connpass.com 2020年12月11日(金) 19:00 ~ 田中宏樹さま - 株式会社セールスフォース・ドットコム Salesforce の最新の開発事情 相野谷直樹さま
- アルプ株式会社 Modern Salesforce CI pattern (ただし第1世代パッケージ管理)(仮) 木村篤彦さま - 株式会社co-meeting Salesforce連携アプリ開発パターン(仮) 松田淳司さま - 株式会社ZAICO はじめてのAppExchange ~ZAICO for Salesforceのリリースに挑む ~ 【再掲】SaaS * Salesforce Developers Winter 2020