SlideShare a Scribd company logo
1 of 33
SFDX
Salesforce Developer eXperience
2018
Introduction
Bohdan Dovhan
Senior Salesforce Developer
Salesforce Development Team Lead
Salesforce Certified Platform Developer I
Salesforce Certified Platform Developer II
Salesforce Certified Platform App Builder
8 years of Development experience
5 years of Development on Salesforce platform
What is SFDX?
SFDX is both a new set of tools and new features affecting development lifecycle.
SFDX helps to shift source of truth from production org to VCS repository.
SFDX is an opportunity to shift the source of truth management and org
development lifecycle [1]
SFDX is most useful for team members using CLI or IDE
Development Styles
Org based development vs. source driven development.
In a traditional SF Dev Lifecycle, application builders use sandboxes to create and
test changes. Source of truth is either production or any sandbox containing
most recent version of code and customization.
With Salesforce DX, you might use source driven development using latest
versions from a centralized source control system like GIT or SVN.
SFDX concepts
SFDX CLI – command line interface tools, for executing commands like
> sfdx force:doc:commands:list
Unlocked packages are intended to provide a repeatable, scriptable and
trackable vehicle for introducing and managing change in your orgs.
Scratch Org is a temporary organization created from DevHub
You can think that this is temporary sandbox of any edition from Developer to
Enterprise, which default lifespan is 7 days and maximum lifespan is 30 days,
which can be set by parameter --durationdays 30
DevHub feature can be enabled on production or tried in SFDX Trial Org [2]
Without scratch org
With scratch org
DevHub options
SFDX CLI is SF CLI
Using SFDX CLI you can use both DX features and standard features.
For example, you can run a SOQL query using CLI
> sfdx force:data:soql:query –q “select id, name from account limit 10” –u production
However, force:source:pull and force:source:push work only with scratch
orgs.
You can create a scratch org by force:org:create command only from DevHub
org – production or trial organization with DevHub feature turned on
Read Release Notes [3] !
They have added ability to write custom plugins if you know Node.js
Authentication
To authenticate into a non-scratch org execute command
> sfdx force:auth:web:login -a alias
This would open a new browser tab where you can login, OAuth credentials will be
stored on local machine.
Find list of custom object on org
> sfdx force:schema:sobject:list -c custom -u alias
Create a record
> sfdx force:data:record:create -s Account -v "Name=Test" –u alias
You can also run Apex tests, retrieve metadata, deploy metadata, create users,
assign permission set etc.
CLI uses Tooling API and Metadata API under hood
DX Project creation
To create a folder with SFDX project
> sfdx force:project:create -n MyNewProject
This would create MyNewProject subfolder in the current folder with SFDX project
structure.
Common files and folder of SFDX project include
sfdx-project.json – contains default project settings
config/project-scratch-def.json – controls shape of scratch org creation
.forceignore – controls source files to omit for push, pull and status commands [4]
force-app/main/default/ - contains source code and configuration metadata
Project settings file
Default content of project settings file sfdx-project.json contains [4]
{
"packageDirectories": [ //source element folder
{
"path": "force-app",
"default": true
}
],
"namespace": "", //possible configuration of namespace
"sfdcLoginUrl": "https://login.salesforce.com",
"sourceApiVersion": "42.0“ // default version of created classes, components etc.
}
Scratch org config
Default content of scratch org definition configuration file config/project-scratch-def.json
contains [6]
{
"orgName": "rwinkelmeyer Company",
"edition": "Developer",
"orgPreferences" : {
"enabled": ["S1DesktopEnabled"]
}
}
To create a scratch org with given settings
> sfdx force:org:create -f config/project-scratch-def.json -a MyScratchOrg.
Scratch org config
Disable Lightning session cache in scratch org
{
"orgName": "rwinkelmeyer Company",
"edition": "Developer",
"orgPreferences" : {
"enabled": ["S1DesktopEnabled"],
"disabled": ["S1EncryptedStoragePref2"]
}
}
To create a scratch org with given settings
> sfdx force:org:create -f config/project-scratch-def.json -a MyScratchOrg.
Advanced example https://gist.github.com/bohdandovhan/d5a91c6d9b16c6c90c7670f50832932c
Global or local config
Find configuration setting by using command
> sfdx force:config:list
Set local setting by command
> sfdx force:config:set
Set global setting by command
> sfdx force:config:set -g
Global settings are stored in “.sfdx” folder under your user account, while local
settings are stored in “.sfdx” folder in the project root folder.
Global settings apply to all projects, local settings apply to project where they are
defined.
It is commonly suggested to add “.sfdx” folder to git ignore
Config list output
Output example of command sfdx force:config:list
=== Config
NAME VALUE LOCATION
───────────────────── ───────────── ────────
defaultdevhubusername DevHub Global
defaultusername GeoAppScratch Local
SFDX Source Control
Three commands to work with sources, similar to git commands
To push local source files to scratch org, use force:source:push command
To pull source files from scratch org to local folder, use force:source:pull
To determine source status, use force:source:status command
However, force:source:pull and force:source:push work only with scratch
orgs.
Once you run force:source:status command, it’ll detect which files have changed
(from a Salesforce DX perspective) since your last pull or push. This is
extremely helpful for detecting remotely changed files, especially when you
have changed the same file locally. The pull and push commands provide a —
forceoverwrite flag which you can then use to enforce (as the name says) an
overwrite for a changed file.
Development Cycle
1. Create a new scratch org and push existing code to it (or start with a new
project from scratch).
2. Develop live in the scratch org and test changes.
3. Pull the changes down to the local machine.
4. Change some components locally.
5. Push the components and validate the work in the org.
6. Commit the changes to git (never forget that scratch orgs expire, so make sure
your code is in version control).
CI with DX Config
1. Install Salesforce CLI on the CI host.
2. Obtain or create a digital certificate to secure your connection to the Salesforce
org. (self-signed certificates work OK)
3. Create and configure a Connected App in your Dev Hub org.
4. Authorize your Salesforce CI user to access this Connected App.
5. Configure a Salesforce JWT (JSON Web Tokens) authentication flow. This
allows the CI host to securely perform headless (without human interactivity)
operations on your Dev Hub org.
Trailhead module to try CI with DX using Travis [7]
CI with DX
What can or should be done with DX CI?
Create a fresh scratch org for test run
Run Apex Tests sfdx force:apex:test:run -w 10 -c -r human
Run Lightning Lint sfdx force:lightning:lint
./path/to/lightning/components/
Run Lightning Testing Service [8]
Install LTS: sfdx force:lightning:test:install
Run: sfdx force:lightning:test:run -a jasmineTests.app
Clean up test environment
CI with DX
What can or should be done with DX CI?
> sfdx force:lightning:lint force-app/main/default/aura —verbose —exit && /
> sfdx force:org:create -w 10 -s -f config/project-scratch-def.json -a ciorg && /
> sfdx force:source:push && /
> sfdx force:apex:test:run -c -r human -w 10
> sfdx force:org:delete -u ciorg -p
CD with DX
DX Continuous delivery options
1. Unlocked packages (second generation packages)
2. Managed packages
3. Metadata API
Create unlocked package version
Deprecated sfdx force:package2:version:create
Use: sfdx force:package:version:create
Update unlocked package version
Deprecated sfdx force:package2:version:update
Use: sfdx force:package:version:update
Install sfdx force:package:install
MP and Metadata API
Create managed package version
sfdx force:package1:version:create /
-i $packageId /
-n "v$releaseVersion" /
-v "$releaseVersion" /
--managedreleased
-w 10
Metadata API Deployment
mkdir mdapi_temp_dir
sfdx force:source:convert -d mdapi_temp_dir
sfdx force:mdapi:deploy -d mdapi_temp_dir/
-u $targetOrg -w 10
rm -fr mdapi_temp_dir
Data Tree Migration
Export data tree data
sfdx force:data:tree:export -q "SELECT Name, Location__Latitude__s,
Location__Longitude__s FROM Account WHERE Location__Latitude__s != NULL AND
Location__Longitude__s != NULL" -d ./data
Import data tree data
sfdx force:data:tree:import --plan data/sample-data-plan.json
SFDX allows to migrate both metadata and data
However, not too much of data, it is not complete replacement for
DataLoader [9]
Files creation
SFDX CLI has commands to create empty apex class, trigger, visualforce page,
component and lightning component.
sfdx force:apex:class:create -n DebugClass -d classes
sfdx force:apex:class:create -n CustomException -d classes -t ApexException
sfdx force:apex:class:create -n TestDebug -d classes -t ApexUnitTest
sfdx force:apex:class:create -n EmailService -d classes -t InboundEmailService
sfdx force:apex:trigger:create -n AccTrigger -s Account -e 'before insert, after update'
sfdx force:visualforce:page:create -n Page -l Label -d pages
sfdx force:visualforce:component:create -n comp -l compLabel -d components
sfdx force:lightning:app:create create a Lightning app
sfdx force:lightning:component:create create a Lightning component
sfdx force:lightning:event:create create a Lightning event
sfdx force:lightning:interface:create create a Lightning interface
sfdx force:lightning:test:create create a Lightning test
Files Pecularities
SFDX CLI has commands to create empty apex class, trigger, visualforce page,
component and lightning component.
However, all other components like SObjects, Fields, Tabs should be created
manually and then pulled from scratch organization
Each custom object field is a separate file. Each element in zipped static resource
is a separate file.
No destructiveChanges.xml is needed, just delete the source file, push and it will
be deleted from scratch organization
Limits
How many activetotal scratch orgs can I have in my edition?
EE – 40, UE, PerfE – 100, Trial – 20 active scratch orgs.
EE – 80, UE, PerfE – 200, Trial – 40 daily scratch orgs allocations.
Edition Active Scratch
Org Allocation
Daily Scratch
Org Allocation
Enterprise
Edition
40 80
Unlimited
Edition
100 200
Performance
Edition
100 200
Dev Hub trial 20 40
Limits
How many active scratch orgs do I
currently have?
Execute command
sfdx force:limits:api:display
-u DevHub
Source conversion
How do I convert my existing source to DX?
First, you need to create a project
sfdx force:project:create -n super_awesome_dx_project
Place a folder with old source in project folder, then execute commands
sfdx force:mdapi:convert -r mdapipackage/
I have a DX project but I want to use ANT Migration Tool. How do I convert DX project
back to ANT migration Tool format?
Easy. Just execute commands
mkdir mdapioutput
sfdx force:source:convert -d mdapioutput/
ANT Tasks in DX
Can I deploy ant project with DX?
Yes. Definitely, just run a command
sfdx force:mdapi:deploy -d mdapioutput/ -w 100
You might want to specify alias for target deployment organization with -u flag.
How do I perform ANT Retrieve task with DX?
Retrieve package
sfdx force:mdapi:retrieve -s -r ./mdapipackage -p DreamInvest -u org -w 10
Retrieve unpackaged source
sfdx force:mdapi:retrieve -k package.xml -r testRetrieve -u org
Licenses support DX
After you’ve enabled Dev Hub capabilities in an org, you’ll need to create user
records for any members of your team who you want to allow to use the Dev
Hub functionality, if they aren’t already Salesforce users. Three types of
licenses work for Salesforce DX users:
Salesforce,
Salesforce Platform
and the new Salesforce Limited Access license.
Permissions needed
To give full access to the Dev Hub org, the permission set must contain these
permissions.
Object Settings > Scratch Org Info > Read, Create, and Delete
Object Settings > Active Scratch Org > Read and Delete
Object Settings > Namespace Registry > Read, Create, and Delete
To work with second-generation packages in the Dev Hub org, the permission set
must also contain:
System Permissions > Create and Update Second-Generation Packages
Referenceshttps://developer.salesforce.com/blogs/2018/02/getting-started-salesforce-dx-part-1-
5.html
https://developer.salesforce.com/promotions/orgs/dx-signup
https://developer.salesforce.com/media/salesforce-cli/releasenotes.htm
https://developer.salesforce.com/docs/atlas.en-
us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm
https://developer.salesforce.com/docs/atlas.en-
us.sfdx_dev.meta/sfdx_dev/sfdx_dev_ws_config.htm
https://developer.salesforce.com/docs/atlas.en-
us.sfdx_dev.meta/sfdx_dev/sfdx_dev_scratch_orgs_def_file_config_values.htm
https://trailhead.salesforce.com/modules/sfdx_travis_ci
https://github.com/forcedotcom/LightningTestingService
https://salesforce.stackexchange.com/questions/221991/sfdx-datasoqlquery-fails-
on-significant-amount-of-data
https://developer.salesforce.com/docs/atlas.en-
us.sfdx_setup.meta/sfdx_setup/sfdx_setup_add_users.htm

More Related Content

What's hot

Gradle plugins, take it to the next level
Gradle plugins, take it to the next levelGradle plugins, take it to the next level
Gradle plugins, take it to the next levelEyal Lezmy
 
Gradle plugin, take control of the build
Gradle plugin, take control of the buildGradle plugin, take control of the build
Gradle plugin, take control of the buildEyal Lezmy
 
Basic Gradle Plugin Writing
Basic Gradle Plugin WritingBasic Gradle Plugin Writing
Basic Gradle Plugin WritingSchalk Cronjé
 
Cocoapods Overview - library dependency manager for iOS
Cocoapods Overview - library dependency manager for iOSCocoapods Overview - library dependency manager for iOS
Cocoapods Overview - library dependency manager for iOSPrajwal S Prakash
 
Idiomatic Gradle Plugin Writing
Idiomatic Gradle Plugin WritingIdiomatic Gradle Plugin Writing
Idiomatic Gradle Plugin WritingSchalk Cronjé
 
Java 9 and the impact on Maven Projects (Devoxx 2016)
Java 9 and the impact on Maven Projects (Devoxx 2016)Java 9 and the impact on Maven Projects (Devoxx 2016)
Java 9 and the impact on Maven Projects (Devoxx 2016)Robert Scholte
 
Idiomatic gradle plugin writing
Idiomatic gradle plugin writingIdiomatic gradle plugin writing
Idiomatic gradle plugin writingSchalk Cronjé
 
C&S APIs in IBM Notes and Domino
C&S APIs in IBM Notes and DominoC&S APIs in IBM Notes and Domino
C&S APIs in IBM Notes and DominoDave Delay
 
Lightweight Developer Provisioning with Gradle
Lightweight Developer Provisioning with GradleLightweight Developer Provisioning with Gradle
Lightweight Developer Provisioning with GradleMario-Leander Reimer
 
Developing modern java web applications with java ee 7 and angular js
Developing modern java web applications with java ee 7 and angular jsDeveloping modern java web applications with java ee 7 and angular js
Developing modern java web applications with java ee 7 and angular jsShekhar Gulati
 
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con GitlabInstrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con GitlabSoftware Guru
 
Intelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulIntelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulMert Çalışkan
 
もう知らずにはいられないGitOpsをArgoCDで学ぶ【WESEEK Tech Conf #3】
もう知らずにはいられないGitOpsをArgoCDで学ぶ【WESEEK Tech Conf #3】もう知らずにはいられないGitOpsをArgoCDで学ぶ【WESEEK Tech Conf #3】
もう知らずにはいられないGitOpsをArgoCDで学ぶ【WESEEK Tech Conf #3】WESEEKWESEEK
 

What's hot (19)

Gradle plugins, take it to the next level
Gradle plugins, take it to the next levelGradle plugins, take it to the next level
Gradle plugins, take it to the next level
 
Gradle plugin, take control of the build
Gradle plugin, take control of the buildGradle plugin, take control of the build
Gradle plugin, take control of the build
 
React Ecosystem
React EcosystemReact Ecosystem
React Ecosystem
 
Basic Gradle Plugin Writing
Basic Gradle Plugin WritingBasic Gradle Plugin Writing
Basic Gradle Plugin Writing
 
Gradle
GradleGradle
Gradle
 
Cocoapods Overview - library dependency manager for iOS
Cocoapods Overview - library dependency manager for iOSCocoapods Overview - library dependency manager for iOS
Cocoapods Overview - library dependency manager for iOS
 
Java 9 and Beyond
Java 9 and BeyondJava 9 and Beyond
Java 9 and Beyond
 
Idiomatic Gradle Plugin Writing
Idiomatic Gradle Plugin WritingIdiomatic Gradle Plugin Writing
Idiomatic Gradle Plugin Writing
 
Java 9 and the impact on Maven Projects (Devoxx 2016)
Java 9 and the impact on Maven Projects (Devoxx 2016)Java 9 and the impact on Maven Projects (Devoxx 2016)
Java 9 and the impact on Maven Projects (Devoxx 2016)
 
React inter3
React inter3React inter3
React inter3
 
Idiomatic gradle plugin writing
Idiomatic gradle plugin writingIdiomatic gradle plugin writing
Idiomatic gradle plugin writing
 
C&S APIs in IBM Notes and Domino
C&S APIs in IBM Notes and DominoC&S APIs in IBM Notes and Domino
C&S APIs in IBM Notes and Domino
 
Lightweight Developer Provisioning with Gradle
Lightweight Developer Provisioning with GradleLightweight Developer Provisioning with Gradle
Lightweight Developer Provisioning with Gradle
 
Android presentation - Gradle ++
Android presentation - Gradle ++Android presentation - Gradle ++
Android presentation - Gradle ++
 
Developing modern java web applications with java ee 7 and angular js
Developing modern java web applications with java ee 7 and angular jsDeveloping modern java web applications with java ee 7 and angular js
Developing modern java web applications with java ee 7 and angular js
 
React nativebeginner1
React nativebeginner1React nativebeginner1
React nativebeginner1
 
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con GitlabInstrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
 
Intelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulIntelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest Istanbul
 
もう知らずにはいられないGitOpsをArgoCDで学ぶ【WESEEK Tech Conf #3】
もう知らずにはいられないGitOpsをArgoCDで学ぶ【WESEEK Tech Conf #3】もう知らずにはいられないGitOpsをArgoCDで学ぶ【WESEEK Tech Conf #3】
もう知らずにはいられないGitOpsをArgoCDで学ぶ【WESEEK Tech Conf #3】
 

Similar to Salesforce Developer eXperience (SFDX)

Comment utiliser Visual Studio Code pour travailler avec une scratch Org
Comment utiliser Visual Studio Code pour travailler avec une scratch OrgComment utiliser Visual Studio Code pour travailler avec une scratch Org
Comment utiliser Visual Studio Code pour travailler avec une scratch OrgThierry TROUIN ☁
 
Créer et gérer une scratch org avec Visual Studio Code
Créer et gérer une scratch org avec Visual Studio CodeCréer et gérer une scratch org avec Visual Studio Code
Créer et gérer une scratch org avec Visual Studio CodeThierry TROUIN ☁
 
sfdx continuous Integration with Jenkins on aws (Part II)
sfdx continuous Integration with Jenkins on aws (Part II)sfdx continuous Integration with Jenkins on aws (Part II)
sfdx continuous Integration with Jenkins on aws (Part II)Jérémy Vial
 
Salesforce Apex Hours:- Salesforce DX
Salesforce Apex Hours:- Salesforce DXSalesforce Apex Hours:- Salesforce DX
Salesforce Apex Hours:- Salesforce DXAmit Chaudhary
 
Get started with Salesforce DX
Get started with Salesforce DXGet started with Salesforce DX
Get started with Salesforce DXAnurag Bhardwaj
 
NAD19 - Create an org with Salesforce DX without Code
NAD19 - Create an org with Salesforce DX without CodeNAD19 - Create an org with Salesforce DX without Code
NAD19 - Create an org with Salesforce DX without CodeThierry TROUIN ☁
 
FTD19 - Salesforce DX with "Visual Studio code"
FTD19 - Salesforce DX with "Visual Studio code"FTD19 - Salesforce DX with "Visual Studio code"
FTD19 - Salesforce DX with "Visual Studio code"Thierry TROUIN ☁
 
Lean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushLean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushPantheon
 
Salesforce DX ことはじめ
Salesforce DX ことはじめSalesforce DX ことはじめ
Salesforce DX ことはじめShingo Yamazaki
 
An introduction to maven gradle and sbt
An introduction to maven gradle and sbtAn introduction to maven gradle and sbt
An introduction to maven gradle and sbtFabio Fumarola
 
OpenStack Rally presentation by RamaK
OpenStack Rally presentation by RamaKOpenStack Rally presentation by RamaK
OpenStack Rally presentation by RamaKRama Krishna B
 
CICD With GitHub, Travis, SonarCloud and Docker Hub
CICD With GitHub, Travis, SonarCloud and Docker HubCICD With GitHub, Travis, SonarCloud and Docker Hub
CICD With GitHub, Travis, SonarCloud and Docker HubCarlos Cavero Barca
 
Getting started with Salesforce DX & CLI
Getting started with Salesforce DX & CLIGetting started with Salesforce DX & CLI
Getting started with Salesforce DX & CLIMichael Gill
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Fabrice Bernhard
 
Openshift cheat rhce_r3v1 rhce
Openshift cheat rhce_r3v1 rhceOpenshift cheat rhce_r3v1 rhce
Openshift cheat rhce_r3v1 rhceDarnette A
 
Salesforce CLI Cheat Sheet
Salesforce CLI Cheat Sheet Salesforce CLI Cheat Sheet
Salesforce CLI Cheat Sheet Keir Bowden
 

Similar to Salesforce Developer eXperience (SFDX) (20)

Comment utiliser Visual Studio Code pour travailler avec une scratch Org
Comment utiliser Visual Studio Code pour travailler avec une scratch OrgComment utiliser Visual Studio Code pour travailler avec une scratch Org
Comment utiliser Visual Studio Code pour travailler avec une scratch Org
 
Créer et gérer une scratch org avec Visual Studio Code
Créer et gérer une scratch org avec Visual Studio CodeCréer et gérer une scratch org avec Visual Studio Code
Créer et gérer une scratch org avec Visual Studio Code
 
Salesforce DX for admin
Salesforce DX for adminSalesforce DX for admin
Salesforce DX for admin
 
Salesforce DX (Meetup du 11/10/2017)
Salesforce DX (Meetup du 11/10/2017)Salesforce DX (Meetup du 11/10/2017)
Salesforce DX (Meetup du 11/10/2017)
 
Salesforce DX for Admin v2
Salesforce DX for Admin v2Salesforce DX for Admin v2
Salesforce DX for Admin v2
 
sfdx continuous Integration with Jenkins on aws (Part II)
sfdx continuous Integration with Jenkins on aws (Part II)sfdx continuous Integration with Jenkins on aws (Part II)
sfdx continuous Integration with Jenkins on aws (Part II)
 
Salesforce Apex Hours:- Salesforce DX
Salesforce Apex Hours:- Salesforce DXSalesforce Apex Hours:- Salesforce DX
Salesforce Apex Hours:- Salesforce DX
 
Get started with Salesforce DX
Get started with Salesforce DXGet started with Salesforce DX
Get started with Salesforce DX
 
NAD19 - Create an org with Salesforce DX without Code
NAD19 - Create an org with Salesforce DX without CodeNAD19 - Create an org with Salesforce DX without Code
NAD19 - Create an org with Salesforce DX without Code
 
FTD19 - Salesforce DX with "Visual Studio code"
FTD19 - Salesforce DX with "Visual Studio code"FTD19 - Salesforce DX with "Visual Studio code"
FTD19 - Salesforce DX with "Visual Studio code"
 
Lean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushLean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and Drush
 
Android develop guideline
Android develop guidelineAndroid develop guideline
Android develop guideline
 
Salesforce DX ことはじめ
Salesforce DX ことはじめSalesforce DX ことはじめ
Salesforce DX ことはじめ
 
An introduction to maven gradle and sbt
An introduction to maven gradle and sbtAn introduction to maven gradle and sbt
An introduction to maven gradle and sbt
 
OpenStack Rally presentation by RamaK
OpenStack Rally presentation by RamaKOpenStack Rally presentation by RamaK
OpenStack Rally presentation by RamaK
 
CICD With GitHub, Travis, SonarCloud and Docker Hub
CICD With GitHub, Travis, SonarCloud and Docker HubCICD With GitHub, Travis, SonarCloud and Docker Hub
CICD With GitHub, Travis, SonarCloud and Docker Hub
 
Getting started with Salesforce DX & CLI
Getting started with Salesforce DX & CLIGetting started with Salesforce DX & CLI
Getting started with Salesforce DX & CLI
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
 
Openshift cheat rhce_r3v1 rhce
Openshift cheat rhce_r3v1 rhceOpenshift cheat rhce_r3v1 rhce
Openshift cheat rhce_r3v1 rhce
 
Salesforce CLI Cheat Sheet
Salesforce CLI Cheat Sheet Salesforce CLI Cheat Sheet
Salesforce CLI Cheat Sheet
 

More from Bohdan Dovhań

PUBLISHING YOUR PACKAGE TO APPEXCHANGE IN 2023
PUBLISHING YOUR PACKAGE TO APPEXCHANGEIN 2023PUBLISHING YOUR PACKAGE TO APPEXCHANGEIN 2023
PUBLISHING YOUR PACKAGE TO APPEXCHANGE IN 2023Bohdan Dovhań
 
Second-generation managed packages
Second-generation managed packagesSecond-generation managed packages
Second-generation managed packagesBohdan Dovhań
 
Migrate To Lightning Web Components from Aura framework to increase performance
Migrate To Lightning Web Components from Aura framework to increase performance Migrate To Lightning Web Components from Aura framework to increase performance
Migrate To Lightning Web Components from Aura framework to increase performance Bohdan Dovhań
 
Sdfc forbidden and advanced techniques
Sdfc forbidden and advanced techniquesSdfc forbidden and advanced techniques
Sdfc forbidden and advanced techniquesBohdan Dovhań
 
Being A Salesforce Jedi
Being A Salesforce JediBeing A Salesforce Jedi
Being A Salesforce JediBohdan Dovhań
 
Salesforce certifications process
Salesforce certifications processSalesforce certifications process
Salesforce certifications processBohdan Dovhań
 
Salesforce for marketing
Salesforce for marketingSalesforce for marketing
Salesforce for marketingBohdan Dovhań
 
Introduction about development, programs, saas and salesforce
Introduction about development, programs, saas and salesforceIntroduction about development, programs, saas and salesforce
Introduction about development, programs, saas and salesforceBohdan Dovhań
 

More from Bohdan Dovhań (11)

PUBLISHING YOUR PACKAGE TO APPEXCHANGE IN 2023
PUBLISHING YOUR PACKAGE TO APPEXCHANGEIN 2023PUBLISHING YOUR PACKAGE TO APPEXCHANGEIN 2023
PUBLISHING YOUR PACKAGE TO APPEXCHANGE IN 2023
 
Second-generation managed packages
Second-generation managed packagesSecond-generation managed packages
Second-generation managed packages
 
Migrate To Lightning Web Components from Aura framework to increase performance
Migrate To Lightning Web Components from Aura framework to increase performance Migrate To Lightning Web Components from Aura framework to increase performance
Migrate To Lightning Web Components from Aura framework to increase performance
 
Sdfc forbidden and advanced techniques
Sdfc forbidden and advanced techniquesSdfc forbidden and advanced techniques
Sdfc forbidden and advanced techniques
 
SFDC REST API
SFDC REST APISFDC REST API
SFDC REST API
 
Being A Salesforce Jedi
Being A Salesforce JediBeing A Salesforce Jedi
Being A Salesforce Jedi
 
Salesforce REST API
Salesforce  REST API Salesforce  REST API
Salesforce REST API
 
Salesforce certifications process
Salesforce certifications processSalesforce certifications process
Salesforce certifications process
 
Salesforce for marketing
Salesforce for marketingSalesforce for marketing
Salesforce for marketing
 
Introduction about development, programs, saas and salesforce
Introduction about development, programs, saas and salesforceIntroduction about development, programs, saas and salesforce
Introduction about development, programs, saas and salesforce
 
ExtJS Sencha Touch
ExtJS Sencha TouchExtJS Sencha Touch
ExtJS Sencha Touch
 

Recently uploaded

Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 

Recently uploaded (20)

Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 

Salesforce Developer eXperience (SFDX)

  • 2. Introduction Bohdan Dovhan Senior Salesforce Developer Salesforce Development Team Lead Salesforce Certified Platform Developer I Salesforce Certified Platform Developer II Salesforce Certified Platform App Builder 8 years of Development experience 5 years of Development on Salesforce platform
  • 3. What is SFDX? SFDX is both a new set of tools and new features affecting development lifecycle. SFDX helps to shift source of truth from production org to VCS repository. SFDX is an opportunity to shift the source of truth management and org development lifecycle [1] SFDX is most useful for team members using CLI or IDE
  • 4. Development Styles Org based development vs. source driven development. In a traditional SF Dev Lifecycle, application builders use sandboxes to create and test changes. Source of truth is either production or any sandbox containing most recent version of code and customization. With Salesforce DX, you might use source driven development using latest versions from a centralized source control system like GIT or SVN.
  • 5. SFDX concepts SFDX CLI – command line interface tools, for executing commands like > sfdx force:doc:commands:list Unlocked packages are intended to provide a repeatable, scriptable and trackable vehicle for introducing and managing change in your orgs. Scratch Org is a temporary organization created from DevHub You can think that this is temporary sandbox of any edition from Developer to Enterprise, which default lifespan is 7 days and maximum lifespan is 30 days, which can be set by parameter --durationdays 30 DevHub feature can be enabled on production or tried in SFDX Trial Org [2]
  • 9. SFDX CLI is SF CLI Using SFDX CLI you can use both DX features and standard features. For example, you can run a SOQL query using CLI > sfdx force:data:soql:query –q “select id, name from account limit 10” –u production However, force:source:pull and force:source:push work only with scratch orgs. You can create a scratch org by force:org:create command only from DevHub org – production or trial organization with DevHub feature turned on Read Release Notes [3] ! They have added ability to write custom plugins if you know Node.js
  • 10. Authentication To authenticate into a non-scratch org execute command > sfdx force:auth:web:login -a alias This would open a new browser tab where you can login, OAuth credentials will be stored on local machine. Find list of custom object on org > sfdx force:schema:sobject:list -c custom -u alias Create a record > sfdx force:data:record:create -s Account -v "Name=Test" –u alias You can also run Apex tests, retrieve metadata, deploy metadata, create users, assign permission set etc. CLI uses Tooling API and Metadata API under hood
  • 11. DX Project creation To create a folder with SFDX project > sfdx force:project:create -n MyNewProject This would create MyNewProject subfolder in the current folder with SFDX project structure. Common files and folder of SFDX project include sfdx-project.json – contains default project settings config/project-scratch-def.json – controls shape of scratch org creation .forceignore – controls source files to omit for push, pull and status commands [4] force-app/main/default/ - contains source code and configuration metadata
  • 12. Project settings file Default content of project settings file sfdx-project.json contains [4] { "packageDirectories": [ //source element folder { "path": "force-app", "default": true } ], "namespace": "", //possible configuration of namespace "sfdcLoginUrl": "https://login.salesforce.com", "sourceApiVersion": "42.0“ // default version of created classes, components etc. }
  • 13. Scratch org config Default content of scratch org definition configuration file config/project-scratch-def.json contains [6] { "orgName": "rwinkelmeyer Company", "edition": "Developer", "orgPreferences" : { "enabled": ["S1DesktopEnabled"] } } To create a scratch org with given settings > sfdx force:org:create -f config/project-scratch-def.json -a MyScratchOrg.
  • 14. Scratch org config Disable Lightning session cache in scratch org { "orgName": "rwinkelmeyer Company", "edition": "Developer", "orgPreferences" : { "enabled": ["S1DesktopEnabled"], "disabled": ["S1EncryptedStoragePref2"] } } To create a scratch org with given settings > sfdx force:org:create -f config/project-scratch-def.json -a MyScratchOrg. Advanced example https://gist.github.com/bohdandovhan/d5a91c6d9b16c6c90c7670f50832932c
  • 15. Global or local config Find configuration setting by using command > sfdx force:config:list Set local setting by command > sfdx force:config:set Set global setting by command > sfdx force:config:set -g Global settings are stored in “.sfdx” folder under your user account, while local settings are stored in “.sfdx” folder in the project root folder. Global settings apply to all projects, local settings apply to project where they are defined. It is commonly suggested to add “.sfdx” folder to git ignore
  • 16. Config list output Output example of command sfdx force:config:list === Config NAME VALUE LOCATION ───────────────────── ───────────── ──────── defaultdevhubusername DevHub Global defaultusername GeoAppScratch Local
  • 17. SFDX Source Control Three commands to work with sources, similar to git commands To push local source files to scratch org, use force:source:push command To pull source files from scratch org to local folder, use force:source:pull To determine source status, use force:source:status command However, force:source:pull and force:source:push work only with scratch orgs. Once you run force:source:status command, it’ll detect which files have changed (from a Salesforce DX perspective) since your last pull or push. This is extremely helpful for detecting remotely changed files, especially when you have changed the same file locally. The pull and push commands provide a — forceoverwrite flag which you can then use to enforce (as the name says) an overwrite for a changed file.
  • 18. Development Cycle 1. Create a new scratch org and push existing code to it (or start with a new project from scratch). 2. Develop live in the scratch org and test changes. 3. Pull the changes down to the local machine. 4. Change some components locally. 5. Push the components and validate the work in the org. 6. Commit the changes to git (never forget that scratch orgs expire, so make sure your code is in version control).
  • 19. CI with DX Config 1. Install Salesforce CLI on the CI host. 2. Obtain or create a digital certificate to secure your connection to the Salesforce org. (self-signed certificates work OK) 3. Create and configure a Connected App in your Dev Hub org. 4. Authorize your Salesforce CI user to access this Connected App. 5. Configure a Salesforce JWT (JSON Web Tokens) authentication flow. This allows the CI host to securely perform headless (without human interactivity) operations on your Dev Hub org. Trailhead module to try CI with DX using Travis [7]
  • 20. CI with DX What can or should be done with DX CI? Create a fresh scratch org for test run Run Apex Tests sfdx force:apex:test:run -w 10 -c -r human Run Lightning Lint sfdx force:lightning:lint ./path/to/lightning/components/ Run Lightning Testing Service [8] Install LTS: sfdx force:lightning:test:install Run: sfdx force:lightning:test:run -a jasmineTests.app Clean up test environment
  • 21. CI with DX What can or should be done with DX CI? > sfdx force:lightning:lint force-app/main/default/aura —verbose —exit && / > sfdx force:org:create -w 10 -s -f config/project-scratch-def.json -a ciorg && / > sfdx force:source:push && / > sfdx force:apex:test:run -c -r human -w 10 > sfdx force:org:delete -u ciorg -p
  • 22. CD with DX DX Continuous delivery options 1. Unlocked packages (second generation packages) 2. Managed packages 3. Metadata API Create unlocked package version Deprecated sfdx force:package2:version:create Use: sfdx force:package:version:create Update unlocked package version Deprecated sfdx force:package2:version:update Use: sfdx force:package:version:update Install sfdx force:package:install
  • 23. MP and Metadata API Create managed package version sfdx force:package1:version:create / -i $packageId / -n "v$releaseVersion" / -v "$releaseVersion" / --managedreleased -w 10 Metadata API Deployment mkdir mdapi_temp_dir sfdx force:source:convert -d mdapi_temp_dir sfdx force:mdapi:deploy -d mdapi_temp_dir/ -u $targetOrg -w 10 rm -fr mdapi_temp_dir
  • 24. Data Tree Migration Export data tree data sfdx force:data:tree:export -q "SELECT Name, Location__Latitude__s, Location__Longitude__s FROM Account WHERE Location__Latitude__s != NULL AND Location__Longitude__s != NULL" -d ./data Import data tree data sfdx force:data:tree:import --plan data/sample-data-plan.json SFDX allows to migrate both metadata and data However, not too much of data, it is not complete replacement for DataLoader [9]
  • 25. Files creation SFDX CLI has commands to create empty apex class, trigger, visualforce page, component and lightning component. sfdx force:apex:class:create -n DebugClass -d classes sfdx force:apex:class:create -n CustomException -d classes -t ApexException sfdx force:apex:class:create -n TestDebug -d classes -t ApexUnitTest sfdx force:apex:class:create -n EmailService -d classes -t InboundEmailService sfdx force:apex:trigger:create -n AccTrigger -s Account -e 'before insert, after update' sfdx force:visualforce:page:create -n Page -l Label -d pages sfdx force:visualforce:component:create -n comp -l compLabel -d components sfdx force:lightning:app:create create a Lightning app sfdx force:lightning:component:create create a Lightning component sfdx force:lightning:event:create create a Lightning event sfdx force:lightning:interface:create create a Lightning interface sfdx force:lightning:test:create create a Lightning test
  • 26. Files Pecularities SFDX CLI has commands to create empty apex class, trigger, visualforce page, component and lightning component. However, all other components like SObjects, Fields, Tabs should be created manually and then pulled from scratch organization Each custom object field is a separate file. Each element in zipped static resource is a separate file. No destructiveChanges.xml is needed, just delete the source file, push and it will be deleted from scratch organization
  • 27. Limits How many activetotal scratch orgs can I have in my edition? EE – 40, UE, PerfE – 100, Trial – 20 active scratch orgs. EE – 80, UE, PerfE – 200, Trial – 40 daily scratch orgs allocations. Edition Active Scratch Org Allocation Daily Scratch Org Allocation Enterprise Edition 40 80 Unlimited Edition 100 200 Performance Edition 100 200 Dev Hub trial 20 40
  • 28. Limits How many active scratch orgs do I currently have? Execute command sfdx force:limits:api:display -u DevHub
  • 29. Source conversion How do I convert my existing source to DX? First, you need to create a project sfdx force:project:create -n super_awesome_dx_project Place a folder with old source in project folder, then execute commands sfdx force:mdapi:convert -r mdapipackage/ I have a DX project but I want to use ANT Migration Tool. How do I convert DX project back to ANT migration Tool format? Easy. Just execute commands mkdir mdapioutput sfdx force:source:convert -d mdapioutput/
  • 30. ANT Tasks in DX Can I deploy ant project with DX? Yes. Definitely, just run a command sfdx force:mdapi:deploy -d mdapioutput/ -w 100 You might want to specify alias for target deployment organization with -u flag. How do I perform ANT Retrieve task with DX? Retrieve package sfdx force:mdapi:retrieve -s -r ./mdapipackage -p DreamInvest -u org -w 10 Retrieve unpackaged source sfdx force:mdapi:retrieve -k package.xml -r testRetrieve -u org
  • 31. Licenses support DX After you’ve enabled Dev Hub capabilities in an org, you’ll need to create user records for any members of your team who you want to allow to use the Dev Hub functionality, if they aren’t already Salesforce users. Three types of licenses work for Salesforce DX users: Salesforce, Salesforce Platform and the new Salesforce Limited Access license.
  • 32. Permissions needed To give full access to the Dev Hub org, the permission set must contain these permissions. Object Settings > Scratch Org Info > Read, Create, and Delete Object Settings > Active Scratch Org > Read and Delete Object Settings > Namespace Registry > Read, Create, and Delete To work with second-generation packages in the Dev Hub org, the permission set must also contain: System Permissions > Create and Update Second-Generation Packages
  • 33. Referenceshttps://developer.salesforce.com/blogs/2018/02/getting-started-salesforce-dx-part-1- 5.html https://developer.salesforce.com/promotions/orgs/dx-signup https://developer.salesforce.com/media/salesforce-cli/releasenotes.htm https://developer.salesforce.com/docs/atlas.en- us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm https://developer.salesforce.com/docs/atlas.en- us.sfdx_dev.meta/sfdx_dev/sfdx_dev_ws_config.htm https://developer.salesforce.com/docs/atlas.en- us.sfdx_dev.meta/sfdx_dev/sfdx_dev_scratch_orgs_def_file_config_values.htm https://trailhead.salesforce.com/modules/sfdx_travis_ci https://github.com/forcedotcom/LightningTestingService https://salesforce.stackexchange.com/questions/221991/sfdx-datasoqlquery-fails- on-significant-amount-of-data https://developer.salesforce.com/docs/atlas.en- us.sfdx_setup.meta/sfdx_setup/sfdx_setup_add_users.htm