SlideShare a Scribd company logo
Comment utiliser VS Code
pour travailler avec une scratch
Org
Salesforce Developer Group, Dakar, Senegal
TROUIN Thierry
@ThierryTrouin
Technical Expert at Business & Decision
Leader of Toulouse Salesforce User Group (France)
Lightning champion
9 ans d’experience
5 certifications
5x Rangers sur Trailhead
Thierry TROUIN
Speaker Slide Layout
 Introduction to SFDX
 Prerequistes
 Scratch org
 Go further
 Conclusion
Table of Contents
Introduction
Introduction
• Salesforce DX, introduces a new type of
environment: Scratch orgs. Scratch orgs are
source-driven and disposable deployments of
Salesforce code which can be used to drive
development, testing, and continuous integration.
• You can quickly spin up a dedicated scratch org to
test your code and, once you've validated your
changes, you can use your own continuous
integration tools to immediately test and promote
your code.
• As soon as your tests are passing, you can merge
your branch, build packages, and deploy to a
staging sandbox for final testing.
RAPID TESTING AND DEVELOPMENT
Scratch Org
 The scratch org is a full of Salesforce code and metadata environment.
 A scratch org is fully configurable
 Ephemeral (1 to 30 days)
 Allowing developers to emulate different Salesforce editions with different features and preferences.
 You can share the scratch org configuration file with other team members, so you all have the same
basic org in which to do your development.
More informations in Salesforce documentations here : https://sforce.co/2QpJ2e6
Introduction
Scratch org : new type of environment
Introduction
Scratch org vs Sandbox
Prerequistes
Prerequistes
Dev Hub
https://sforce.co/2K1PHKA
Enable Dev Hub in your org so you can create
and manage scratch orgs from the command
line. Scratch orgs are disposable Salesforce
orgs to support development and testing.
The Salesforce CLI is a powerful command line
interface that simplifies development and build
automation when working with your Salesforce org.
Use it to:
• Aggregate all the tools you need to develop with and
perform commands against your Salesforce org
• Synchronize source to and from scratch orgs
• Create and manage orgs
• Import and export data
• Create and execute tests
• Create and install packages
Prerequist
Salesforce CLI
https://sforce.co/2vyFuuY
Prerequistes
Visual Studio Code
 Outlook is for e-mail
 Word is to write documents
 Chrome is for internet
navigation
 « Visual studio Code »
is recommended and powerful IDE
for Salesforce
https://code.visualstudio.com/
Prerequistes
Salesforce Extensions Pack
This extension pack includes tools for
developing on the Salesforce platform
in the lightweight, extensible VS Code
editor.
These tools provide features for
working with development orgs
(scratch orgs, sandboxes, and DE
orgs), Apex, Aura components, and
Visualforce.
https://sforce.co/2LlwIMO
Prerequistes
Git (optional)
 Git was created by Linus Torvalds
in 2005 for development of the
Linux kernel, with other kernel
developers contributing to its initial
development
 Git is a distributed version-control
system for tracking changes in
source code during software
development.
 It is designed for coordinating work
among programmers, but it can be
used to track changes in any set of
files.
Créer une « Scratch Org »
Scratch Org
Open the IDE
Scratch Org
Click « view » menu and « Command Palette » Menu
Scratch Org
Enter « SFDX » and click « Create Project »
WARNING
« Create
project with
manifest » is
for sandbox or
dev org
Scratch Org
Fill the project Name
Scratch Org
Select the folder
Scratch Org
Folder hierarchy
Great, you have created your first project…
Now you could create the org 
Scratch Org
Scratch Org
Enter « SFDX Auth» and click « Authorize a Dev Hub »
Scratch Org
Login URL opens automatically
After login, you can close the
window 
Enter the login and password
of your DevHub !
Scratch Org
Enter « SFDX Create » and click « Create a Default Scratch Org… »
Scratch Org
Enter « SFDX Open » and click « Open Default Org »
Scratch Org
Org is open automaticly in your browser
Scratch Org
Your org is ready.
You can navigate and configure org
Scratch Org
Summary
 Create Project
 Fill Name and select directory
 You can here setup « configuration file »
 Connect project to the devHub
 Create Org
 Fill the alias and the validity
 Open Org
Go further
Go further
This is a prerequisite if you want to install an
AppExchange
 sfdx force:user:password:generate -u
MyAliasName
Change user password
Go further
 Editions
 Developer, Enterprise, Group, Professional
 Features
 Communities, ServiceCloud, Chatbot, etc…
 Settings
 omniChannelSettings, caseSettings
 Org Preferences
 networksEnabled, s1DesktopEnabled
Scratch Org Definition Configuration Values
https://sforce.co/2IaDgcC
Go further
With the « .forceignore » file, you can exclude
metadata from your project
Exclude metadata
Go further
You can retrieve or send metadata to your org
with this following command :
 Status
 View All changes
 Retrieve
 Pull Source from default Scratch Org
 Send
 Push Source to default Scratch Org
Retrieve metadata
Go further
Export & Import
 Export data
 sfdx force:data:tree:export –q "SELECT Name FROM Account WHERE Name != NULL“ -d ./data
 The option « -q » defines that it is a ‘query’
 The option « -d » defines the output file path
 Export data (multiple releated object)
 sfdx force:data:tree:export -q "select Name, (Select FirstName, LastName,Email from Contacts),
(Select Name, CloseDate, StageName, Amount from Opportunities), (Select CaseNumber, Status,
Priority from Cases) from Account" -d ./data
 Import data
 sfdx force:data:tree:import --sobjecttreefiles data/Account.json
Go further
CLI : help for command
sfdx force:source -h
sfdx force -h
sfdx force:source:push -h
Go further
Execute Anonymous Code
 Open the apex script file
 Execute Anonymous Apex with Editor Contents
Go further
Run SOQL Query
 Open the SOQL script File
 Refresh SObject Definitions
 Select the query
 Execute SOQL Query with Currently Selected
Text
Conclusion
Conclusion
Summary base command
Commande Commentaires
sfdx force:auth:web:login -d -a DevHub Connect to the DevHub
sfdx force:project:create -n ProjectName Create project
Cd FolderName Access to the folder
sfdx force:org:create -s -f config/project-scratch-def.json -a ProjectAlias Create scratch org (and name it)
sfdx force:apex:class:create -n AccountController -d force-app/main/default/classes Create an Apex Class (and name it)
sfdx force:source:push Push metadata to the org
sfdx force:org:open Open org in your browser
sfdx force:source:pull Load metadata (in your computer)
sfdx force:data:tree:export -q "SELECT Name FROM Account " -d ./data Export data
sfdx force:data:tree:import --sobjecttreefiles data/Account.json Import data
Conclusion
Trailhead
 sfdx is passionate about you. If you want to know more, Trailhead is your best friend
https://sforce.co/2VapNHd
Conclusion
References
 Salesforce DX CLI (download page)
https://sforce.co/2vyFuuY
 Salesforce CLI Command Reference
https://sforce.co/2pdPEAe
 Salesforce DX Developer Guide
https://sforce.co/2HBToov
 Trailhead : Salesforce DX Trail
https://sforce.co/2VapNHd
https://kahoot.it/
Quiz
Quel était le sujet du jour ?
 Comment préparer des crêpes
 Comment utiliser Salesforce
 Comment utiliser VS Code pour gérer des scratch Org
 Comment utiliser SFDX
Quiz
1/5
Qu'est-ce qu'une scractch Org ?
 Un environnement de développement
 Un environnement de Sandbox
 Un environnement éphémère et complètement personnalisable
 Quelque chose d'autre ?
Quiz
2/5
Comment faire une récupération en local des métadonnées de notre scratch org ?
 SFDX Pull
 SFDX Push
 SFDX retrieve
 Ant retrieve
Quiz
3/5
Quel menu me permet d'accéder au multiple commande ?
 Menu Command Palette
 Menu Open
 Menu Run
 Menu Preference
Quiz
4/5
Quel commande me permet de créer une scratch Org
 New Scratch Org
 Create Project with Manifest
 Create Project
 Open default Org
Quiz
5/5

More Related Content

What's hot

201913046 wahyu septiansyah network programing
201913046 wahyu septiansyah network programing201913046 wahyu septiansyah network programing
201913046 wahyu septiansyah network programingwahyuseptiansyah
 
Introduction to Solr
Introduction to SolrIntroduction to Solr
Introduction to SolrJayesh Bhoyar
 
Hacking Oracle From Web Apps 1 9
Hacking Oracle From Web Apps 1 9Hacking Oracle From Web Apps 1 9
Hacking Oracle From Web Apps 1 9sumsid1234
 
Mastering solr
Mastering solrMastering solr
Mastering solrjurcello
 
20150210 solr introdution
20150210 solr introdution20150210 solr introdution
20150210 solr introdutionXuan-Chao Huang
 
QA Lab: тестирование ПО. Станислав Шмидт: "Self-testing REST APIs with API Fi...
QA Lab: тестирование ПО. Станислав Шмидт: "Self-testing REST APIs with API Fi...QA Lab: тестирование ПО. Станислав Шмидт: "Self-testing REST APIs with API Fi...
QA Lab: тестирование ПО. Станислав Шмидт: "Self-testing REST APIs with API Fi...GeeksLab Odessa
 
ShmooCon 2009 - (Re)Playing(Blind)Sql
ShmooCon 2009 - (Re)Playing(Blind)SqlShmooCon 2009 - (Re)Playing(Blind)Sql
ShmooCon 2009 - (Re)Playing(Blind)SqlChema Alonso
 
QA Lab: тестирование ПО. Яков Крамаренко: "KISS Automation"
QA Lab: тестирование ПО. Яков Крамаренко: "KISS Automation"QA Lab: тестирование ПО. Яков Крамаренко: "KISS Automation"
QA Lab: тестирование ПО. Яков Крамаренко: "KISS Automation"GeeksLab Odessa
 
Accessibility Testing using Axe
Accessibility Testing using AxeAccessibility Testing using Axe
Accessibility Testing using AxeRapidValue
 
JavaOne - The JavaFX Community and Ecosystem
JavaOne - The JavaFX Community and EcosystemJavaOne - The JavaFX Community and Ecosystem
JavaOne - The JavaFX Community and EcosystemAlexander Casall
 
ActiveRecord Query Interface (1), Season 1
ActiveRecord Query Interface (1), Season 1ActiveRecord Query Interface (1), Season 1
ActiveRecord Query Interface (1), Season 1RORLAB
 
Not your father's tests
Not your father's testsNot your father's tests
Not your father's testsSean P. Floyd
 
Getting started with Java 9 modules
Getting started with Java 9 modulesGetting started with Java 9 modules
Getting started with Java 9 modulesRafael Winterhalter
 
Mastering Java Bytecode With ASM - 33rd degree, 2012
Mastering Java Bytecode With ASM - 33rd degree, 2012Mastering Java Bytecode With ASM - 33rd degree, 2012
Mastering Java Bytecode With ASM - 33rd degree, 2012Anton Arhipov
 

What's hot (19)

201913046 wahyu septiansyah network programing
201913046 wahyu septiansyah network programing201913046 wahyu septiansyah network programing
201913046 wahyu septiansyah network programing
 
Introduction to Solr
Introduction to SolrIntroduction to Solr
Introduction to Solr
 
Hacking Oracle From Web Apps 1 9
Hacking Oracle From Web Apps 1 9Hacking Oracle From Web Apps 1 9
Hacking Oracle From Web Apps 1 9
 
Mastering solr
Mastering solrMastering solr
Mastering solr
 
20150210 solr introdution
20150210 solr introdution20150210 solr introdution
20150210 solr introdution
 
QA Lab: тестирование ПО. Станислав Шмидт: "Self-testing REST APIs with API Fi...
QA Lab: тестирование ПО. Станислав Шмидт: "Self-testing REST APIs with API Fi...QA Lab: тестирование ПО. Станислав Шмидт: "Self-testing REST APIs with API Fi...
QA Lab: тестирование ПО. Станислав Шмидт: "Self-testing REST APIs with API Fi...
 
ShmooCon 2009 - (Re)Playing(Blind)Sql
ShmooCon 2009 - (Re)Playing(Blind)SqlShmooCon 2009 - (Re)Playing(Blind)Sql
ShmooCon 2009 - (Re)Playing(Blind)Sql
 
QA Lab: тестирование ПО. Яков Крамаренко: "KISS Automation"
QA Lab: тестирование ПО. Яков Крамаренко: "KISS Automation"QA Lab: тестирование ПО. Яков Крамаренко: "KISS Automation"
QA Lab: тестирование ПО. Яков Крамаренко: "KISS Automation"
 
Accessibility Testing using Axe
Accessibility Testing using AxeAccessibility Testing using Axe
Accessibility Testing using Axe
 
Solr workshop
Solr workshopSolr workshop
Solr workshop
 
JavaOne - The JavaFX Community and Ecosystem
JavaOne - The JavaFX Community and EcosystemJavaOne - The JavaFX Community and Ecosystem
JavaOne - The JavaFX Community and Ecosystem
 
Django Good Practices
Django Good PracticesDjango Good Practices
Django Good Practices
 
ERRest
ERRestERRest
ERRest
 
Certifications Java
Certifications JavaCertifications Java
Certifications Java
 
ActiveRecord Query Interface (1), Season 1
ActiveRecord Query Interface (1), Season 1ActiveRecord Query Interface (1), Season 1
ActiveRecord Query Interface (1), Season 1
 
JSON in Solr: from top to bottom
JSON in Solr: from top to bottomJSON in Solr: from top to bottom
JSON in Solr: from top to bottom
 
Not your father's tests
Not your father's testsNot your father's tests
Not your father's tests
 
Getting started with Java 9 modules
Getting started with Java 9 modulesGetting started with Java 9 modules
Getting started with Java 9 modules
 
Mastering Java Bytecode With ASM - 33rd degree, 2012
Mastering Java Bytecode With ASM - 33rd degree, 2012Mastering Java Bytecode With ASM - 33rd degree, 2012
Mastering Java Bytecode With ASM - 33rd degree, 2012
 

Similar to Comment utiliser Visual Studio Code pour travailler avec une scratch Org

Salesforce Developer eXperience (SFDX)
Salesforce Developer eXperience (SFDX)Salesforce Developer eXperience (SFDX)
Salesforce Developer eXperience (SFDX)Bohdan Dovhań
 
SFDX - Spring 2019 Update
SFDX - Spring 2019 UpdateSFDX - Spring 2019 Update
SFDX - Spring 2019 UpdateBohdan Dovhań
 
Salesforce Apex Hours:- Salesforce DX
Salesforce Apex Hours:- Salesforce DXSalesforce Apex Hours:- Salesforce DX
Salesforce Apex Hours:- Salesforce DXAmit Chaudhary
 
Live Session1 lightning web component
Live Session1 lightning web componentLive Session1 lightning web component
Live Session1 lightning web componentSmritiSharan1
 
How to Manage Scratch Org.pptx
How to Manage Scratch Org.pptxHow to Manage Scratch Org.pptx
How to Manage Scratch Org.pptxAwsQuality
 
Integrating SalesforceDX and Test Automation
Integrating SalesforceDX and Test AutomationIntegrating SalesforceDX and Test Automation
Integrating SalesforceDX and Test AutomationRichard Clark
 
Salesforce DX Test Data Migration
Salesforce DX Test Data MigrationSalesforce DX Test Data Migration
Salesforce DX Test Data MigrationAbhi TriPaThi ☁
 
SalesforceDX : SalesforceSaturday
SalesforceDX : SalesforceSaturdaySalesforceDX : SalesforceSaturday
SalesforceDX : SalesforceSaturdayMadan Khichi
 
Salesforce DX with Visual Studio Code
Salesforce DX with Visual Studio CodeSalesforce DX with Visual Studio Code
Salesforce DX with Visual Studio CodeThierry TROUIN ☁
 
Best practices for implementing CI/CD on Salesforce
Best practices for implementing CI/CD on SalesforceBest practices for implementing CI/CD on Salesforce
Best practices for implementing CI/CD on SalesforceAIMDek Technologies
 
Get started with Salesforce DX
Get started with Salesforce DXGet started with Salesforce DX
Get started with Salesforce DXAnurag Bhardwaj
 
Tech Insiders Salesforce: SFDX e Integración Continua
Tech Insiders Salesforce: SFDX e Integración ContinuaTech Insiders Salesforce: SFDX e Integración Continua
Tech Insiders Salesforce: SFDX e Integración ContinuaGlobant
 
Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...
Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...
Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...Ajeet Singh Raina
 
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
 

Similar to Comment utiliser Visual Studio Code pour travailler avec une scratch Org (20)

Salesforce DX for admin
Salesforce DX for adminSalesforce DX for admin
Salesforce DX for admin
 
Salesforce DX for Admin v2
Salesforce DX for Admin v2Salesforce DX for Admin v2
Salesforce DX for Admin v2
 
Salesforce Developer eXperience (SFDX)
Salesforce Developer eXperience (SFDX)Salesforce Developer eXperience (SFDX)
Salesforce Developer eXperience (SFDX)
 
SFDX Presentation
SFDX PresentationSFDX Presentation
SFDX Presentation
 
SFDX - Spring 2019 Update
SFDX - Spring 2019 UpdateSFDX - Spring 2019 Update
SFDX - Spring 2019 Update
 
Salesforce Apex Hours:- Salesforce DX
Salesforce Apex Hours:- Salesforce DXSalesforce Apex Hours:- Salesforce DX
Salesforce Apex Hours:- Salesforce DX
 
Live Session1 lightning web component
Live Session1 lightning web componentLive Session1 lightning web component
Live Session1 lightning web component
 
How to Manage Scratch Org.pptx
How to Manage Scratch Org.pptxHow to Manage Scratch Org.pptx
How to Manage Scratch Org.pptx
 
Integrating SalesforceDX and Test Automation
Integrating SalesforceDX and Test AutomationIntegrating SalesforceDX and Test Automation
Integrating SalesforceDX and Test Automation
 
Salesforce DX Test Data Migration
Salesforce DX Test Data MigrationSalesforce DX Test Data Migration
Salesforce DX Test Data Migration
 
SalesforceDX : SalesforceSaturday
SalesforceDX : SalesforceSaturdaySalesforceDX : SalesforceSaturday
SalesforceDX : SalesforceSaturday
 
Salesforce DX with Visual Studio Code
Salesforce DX with Visual Studio CodeSalesforce DX with Visual Studio Code
Salesforce DX with Visual Studio Code
 
Best practices for implementing CI/CD on Salesforce
Best practices for implementing CI/CD on SalesforceBest practices for implementing CI/CD on Salesforce
Best practices for implementing CI/CD on Salesforce
 
Get started with Salesforce DX
Get started with Salesforce DXGet started with Salesforce DX
Get started with Salesforce DX
 
Tech Insiders Salesforce: SFDX e Integración Continua
Tech Insiders Salesforce: SFDX e Integración ContinuaTech Insiders Salesforce: SFDX e Integración Continua
Tech Insiders Salesforce: SFDX e Integración Continua
 
Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...
Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...
Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...
 
Android develop guideline
Android develop guidelineAndroid develop guideline
Android develop guideline
 
Intelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulIntelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest Istanbul
 
Open event presentation.3 2
Open event presentation.3 2Open event presentation.3 2
Open event presentation.3 2
 
Introduction to salesforce_DX
Introduction to salesforce_DXIntroduction to salesforce_DX
Introduction to salesforce_DX
 

More from Thierry TROUIN ☁

AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsThierry TROUIN ☁
 
Comment Challenger les ApexDebugLog et comment améliorer leur analyse
Comment Challenger les ApexDebugLog et comment améliorer leur analyseComment Challenger les ApexDebugLog et comment améliorer leur analyse
Comment Challenger les ApexDebugLog et comment améliorer leur analyseThierry TROUIN ☁
 
Comment exploiter facilement une API avec les Flows
Comment exploiter facilement une API avec les FlowsComment exploiter facilement une API avec les Flows
Comment exploiter facilement une API avec les FlowsThierry TROUIN ☁
 
TunisUserGroup - Ecosysteme salesforce.pptx
TunisUserGroup -  Ecosysteme salesforce.pptxTunisUserGroup -  Ecosysteme salesforce.pptx
TunisUserGroup - Ecosysteme salesforce.pptxThierry TROUIN ☁
 
Controle de configuration ou fuite de donnees, comment mieux securiser SFDC
Controle de configuration ou fuite de donnees, comment mieux securiser SFDCControle de configuration ou fuite de donnees, comment mieux securiser SFDC
Controle de configuration ou fuite de donnees, comment mieux securiser SFDCThierry TROUIN ☁
 
Monia, l’IAssistante qui aide vos equipes a closer leurs Opportunites
Monia, l’IAssistante qui aide vos equipes a closer leurs OpportunitesMonia, l’IAssistante qui aide vos equipes a closer leurs Opportunites
Monia, l’IAssistante qui aide vos equipes a closer leurs OpportunitesThierry TROUIN ☁
 
Sales enablement, e-signature, closing & automations dans Salesforce
Sales enablement, e-signature, closing & automations dans SalesforceSales enablement, e-signature, closing & automations dans Salesforce
Sales enablement, e-signature, closing & automations dans SalesforceThierry TROUIN ☁
 
Les formulaires web dans salesforce
Les formulaires web dans salesforceLes formulaires web dans salesforce
Les formulaires web dans salesforceThierry TROUIN ☁
 
Découvrez les enquêtes de satisfaction dans Salesforce
Découvrez les enquêtes de satisfaction dans SalesforceDécouvrez les enquêtes de satisfaction dans Salesforce
Découvrez les enquêtes de satisfaction dans SalesforceThierry TROUIN ☁
 
Winter-23-French-Gathering+Dreamforce
Winter-23-French-Gathering+DreamforceWinter-23-French-Gathering+Dreamforce
Winter-23-French-Gathering+DreamforceThierry TROUIN ☁
 
Meetup Cameroun - Presentation SFDC
Meetup Cameroun - Presentation SFDCMeetup Cameroun - Presentation SFDC
Meetup Cameroun - Presentation SFDCThierry TROUIN ☁
 
Construire sa strategie de gestion des donnees Salesforce avec Odaseva
Construire sa strategie de gestion des donnees Salesforce avec OdasevaConstruire sa strategie de gestion des donnees Salesforce avec Odaseva
Construire sa strategie de gestion des donnees Salesforce avec OdasevaThierry TROUIN ☁
 
Data Quality : Presentation de ISV Ellisphere
Data Quality : Presentation de ISV EllisphereData Quality : Presentation de ISV Ellisphere
Data Quality : Presentation de ISV EllisphereThierry TROUIN ☁
 
Simplifiez vos journées avec sfdx-hardis et l’écosystème open-source
Simplifiez vos journées avec sfdx-hardis et l’écosystème open-sourceSimplifiez vos journées avec sfdx-hardis et l’écosystème open-source
Simplifiez vos journées avec sfdx-hardis et l’écosystème open-sourceThierry TROUIN ☁
 
Ameliorez vos parcours omnicanaux avec Marketing Cloud
Ameliorez vos parcours omnicanaux avec Marketing CloudAmeliorez vos parcours omnicanaux avec Marketing Cloud
Ameliorez vos parcours omnicanaux avec Marketing CloudThierry TROUIN ☁
 
Bien Démarrer avec Pardot: Comment délivrer un engagement client connecté
Bien Démarrer avec Pardot: Comment délivrer un engagement client connectéBien Démarrer avec Pardot: Comment délivrer un engagement client connecté
Bien Démarrer avec Pardot: Comment délivrer un engagement client connectéThierry TROUIN ☁
 
Ameliorez votre Marketing : Introduction aux solutions Marketing Cloud et Pardot
Ameliorez votre Marketing : Introduction aux solutions Marketing Cloud et PardotAmeliorez votre Marketing : Introduction aux solutions Marketing Cloud et Pardot
Ameliorez votre Marketing : Introduction aux solutions Marketing Cloud et PardotThierry TROUIN ☁
 
Debarrassez-vous de la dette technique dans votre organisation avec OrgCheck
Debarrassez-vous de la dette technique dans votre organisation avec OrgCheckDebarrassez-vous de la dette technique dans votre organisation avec OrgCheck
Debarrassez-vous de la dette technique dans votre organisation avec OrgCheckThierry TROUIN ☁
 

More from Thierry TROUIN ☁ (20)

AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with Flows
 
Comment Challenger les ApexDebugLog et comment améliorer leur analyse
Comment Challenger les ApexDebugLog et comment améliorer leur analyseComment Challenger les ApexDebugLog et comment améliorer leur analyse
Comment Challenger les ApexDebugLog et comment améliorer leur analyse
 
Comment exploiter facilement une API avec les Flows
Comment exploiter facilement une API avec les FlowsComment exploiter facilement une API avec les Flows
Comment exploiter facilement une API avec les Flows
 
TunisUserGroup - Ecosysteme salesforce.pptx
TunisUserGroup -  Ecosysteme salesforce.pptxTunisUserGroup -  Ecosysteme salesforce.pptx
TunisUserGroup - Ecosysteme salesforce.pptx
 
Controle de configuration ou fuite de donnees, comment mieux securiser SFDC
Controle de configuration ou fuite de donnees, comment mieux securiser SFDCControle de configuration ou fuite de donnees, comment mieux securiser SFDC
Controle de configuration ou fuite de donnees, comment mieux securiser SFDC
 
Monia, l’IAssistante qui aide vos equipes a closer leurs Opportunites
Monia, l’IAssistante qui aide vos equipes a closer leurs OpportunitesMonia, l’IAssistante qui aide vos equipes a closer leurs Opportunites
Monia, l’IAssistante qui aide vos equipes a closer leurs Opportunites
 
Sales enablement, e-signature, closing & automations dans Salesforce
Sales enablement, e-signature, closing & automations dans SalesforceSales enablement, e-signature, closing & automations dans Salesforce
Sales enablement, e-signature, closing & automations dans Salesforce
 
Les formulaires web dans salesforce
Les formulaires web dans salesforceLes formulaires web dans salesforce
Les formulaires web dans salesforce
 
Découvrez les enquêtes de satisfaction dans Salesforce
Découvrez les enquêtes de satisfaction dans SalesforceDécouvrez les enquêtes de satisfaction dans Salesforce
Découvrez les enquêtes de satisfaction dans Salesforce
 
Winter-23-French-Gathering+Dreamforce
Winter-23-French-Gathering+DreamforceWinter-23-French-Gathering+Dreamforce
Winter-23-French-Gathering+Dreamforce
 
Meetup Cameroun - Presentation SFDC
Meetup Cameroun - Presentation SFDCMeetup Cameroun - Presentation SFDC
Meetup Cameroun - Presentation SFDC
 
Construire sa strategie de gestion des donnees Salesforce avec Odaseva
Construire sa strategie de gestion des donnees Salesforce avec OdasevaConstruire sa strategie de gestion des donnees Salesforce avec Odaseva
Construire sa strategie de gestion des donnees Salesforce avec Odaseva
 
Summer-22-FG-Mai-2022
Summer-22-FG-Mai-2022Summer-22-FG-Mai-2022
Summer-22-FG-Mai-2022
 
Data Quality : Presentation de ISV Ellisphere
Data Quality : Presentation de ISV EllisphereData Quality : Presentation de ISV Ellisphere
Data Quality : Presentation de ISV Ellisphere
 
Simplifiez vos journées avec sfdx-hardis et l’écosystème open-source
Simplifiez vos journées avec sfdx-hardis et l’écosystème open-sourceSimplifiez vos journées avec sfdx-hardis et l’écosystème open-source
Simplifiez vos journées avec sfdx-hardis et l’écosystème open-source
 
Ameliorez vos parcours omnicanaux avec Marketing Cloud
Ameliorez vos parcours omnicanaux avec Marketing CloudAmeliorez vos parcours omnicanaux avec Marketing Cloud
Ameliorez vos parcours omnicanaux avec Marketing Cloud
 
Bien Démarrer avec Pardot: Comment délivrer un engagement client connecté
Bien Démarrer avec Pardot: Comment délivrer un engagement client connectéBien Démarrer avec Pardot: Comment délivrer un engagement client connecté
Bien Démarrer avec Pardot: Comment délivrer un engagement client connecté
 
Ameliorez votre Marketing : Introduction aux solutions Marketing Cloud et Pardot
Ameliorez votre Marketing : Introduction aux solutions Marketing Cloud et PardotAmeliorez votre Marketing : Introduction aux solutions Marketing Cloud et Pardot
Ameliorez votre Marketing : Introduction aux solutions Marketing Cloud et Pardot
 
Debarrassez-vous de la dette technique dans votre organisation avec OrgCheck
Debarrassez-vous de la dette technique dans votre organisation avec OrgCheckDebarrassez-vous de la dette technique dans votre organisation avec OrgCheck
Debarrassez-vous de la dette technique dans votre organisation avec OrgCheck
 
Release Winter 22 FR
Release Winter 22 FRRelease Winter 22 FR
Release Winter 22 FR
 

Recently uploaded

ER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAEER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAEHimani415946
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxGal Baras
 
The Use of AI in Indonesia Election 2024: A Case Study
The Use of AI in Indonesia Election 2024: A Case StudyThe Use of AI in Indonesia Election 2024: A Case Study
The Use of AI in Indonesia Election 2024: A Case StudyDamar Juniarto
 
The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxlaozhuseo02
 
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理aagad
 
Article writing on excessive use of internet.pptx
Article writing on excessive use of internet.pptxArticle writing on excessive use of internet.pptx
Article writing on excessive use of internet.pptxabhinandnam9997
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shoplaozhuseo02
 
The AI Powered Organization-Intro to AI-LAN.pdf
The AI Powered Organization-Intro to AI-LAN.pdfThe AI Powered Organization-Intro to AI-LAN.pdf
The AI Powered Organization-Intro to AI-LAN.pdfSiskaFitrianingrum
 
How Do I Begin the Linksys Velop Setup Process?
How Do I Begin the Linksys Velop Setup Process?How Do I Begin the Linksys Velop Setup Process?
How Do I Begin the Linksys Velop Setup Process?Linksys Velop Login
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesSanjeev Rampal
 
Pvtaan Social media marketing proposal.pdf
Pvtaan Social media marketing proposal.pdfPvtaan Social media marketing proposal.pdf
Pvtaan Social media marketing proposal.pdfPvtaan
 

Recently uploaded (12)

The Best AI Powered Software - Intellivid AI Studio
The Best AI Powered Software - Intellivid AI StudioThe Best AI Powered Software - Intellivid AI Studio
The Best AI Powered Software - Intellivid AI Studio
 
ER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAEER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAE
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
 
The Use of AI in Indonesia Election 2024: A Case Study
The Use of AI in Indonesia Election 2024: A Case StudyThe Use of AI in Indonesia Election 2024: A Case Study
The Use of AI in Indonesia Election 2024: A Case Study
 
The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
 
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
 
Article writing on excessive use of internet.pptx
Article writing on excessive use of internet.pptxArticle writing on excessive use of internet.pptx
Article writing on excessive use of internet.pptx
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
 
The AI Powered Organization-Intro to AI-LAN.pdf
The AI Powered Organization-Intro to AI-LAN.pdfThe AI Powered Organization-Intro to AI-LAN.pdf
The AI Powered Organization-Intro to AI-LAN.pdf
 
How Do I Begin the Linksys Velop Setup Process?
How Do I Begin the Linksys Velop Setup Process?How Do I Begin the Linksys Velop Setup Process?
How Do I Begin the Linksys Velop Setup Process?
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
 
Pvtaan Social media marketing proposal.pdf
Pvtaan Social media marketing proposal.pdfPvtaan Social media marketing proposal.pdf
Pvtaan Social media marketing proposal.pdf
 

Comment utiliser Visual Studio Code pour travailler avec une scratch Org

  • 1. Comment utiliser VS Code pour travailler avec une scratch Org Salesforce Developer Group, Dakar, Senegal TROUIN Thierry @ThierryTrouin
  • 2. Technical Expert at Business & Decision Leader of Toulouse Salesforce User Group (France) Lightning champion 9 ans d’experience 5 certifications 5x Rangers sur Trailhead Thierry TROUIN Speaker Slide Layout
  • 3.  Introduction to SFDX  Prerequistes  Scratch org  Go further  Conclusion Table of Contents
  • 5. Introduction • Salesforce DX, introduces a new type of environment: Scratch orgs. Scratch orgs are source-driven and disposable deployments of Salesforce code which can be used to drive development, testing, and continuous integration. • You can quickly spin up a dedicated scratch org to test your code and, once you've validated your changes, you can use your own continuous integration tools to immediately test and promote your code. • As soon as your tests are passing, you can merge your branch, build packages, and deploy to a staging sandbox for final testing. RAPID TESTING AND DEVELOPMENT
  • 6. Scratch Org  The scratch org is a full of Salesforce code and metadata environment.  A scratch org is fully configurable  Ephemeral (1 to 30 days)  Allowing developers to emulate different Salesforce editions with different features and preferences.  You can share the scratch org configuration file with other team members, so you all have the same basic org in which to do your development. More informations in Salesforce documentations here : https://sforce.co/2QpJ2e6
  • 7. Introduction Scratch org : new type of environment
  • 10. Prerequistes Dev Hub https://sforce.co/2K1PHKA Enable Dev Hub in your org so you can create and manage scratch orgs from the command line. Scratch orgs are disposable Salesforce orgs to support development and testing.
  • 11. The Salesforce CLI is a powerful command line interface that simplifies development and build automation when working with your Salesforce org. Use it to: • Aggregate all the tools you need to develop with and perform commands against your Salesforce org • Synchronize source to and from scratch orgs • Create and manage orgs • Import and export data • Create and execute tests • Create and install packages Prerequist Salesforce CLI https://sforce.co/2vyFuuY
  • 12. Prerequistes Visual Studio Code  Outlook is for e-mail  Word is to write documents  Chrome is for internet navigation  « Visual studio Code » is recommended and powerful IDE for Salesforce https://code.visualstudio.com/
  • 13. Prerequistes Salesforce Extensions Pack This extension pack includes tools for developing on the Salesforce platform in the lightweight, extensible VS Code editor. These tools provide features for working with development orgs (scratch orgs, sandboxes, and DE orgs), Apex, Aura components, and Visualforce. https://sforce.co/2LlwIMO
  • 14. Prerequistes Git (optional)  Git was created by Linus Torvalds in 2005 for development of the Linux kernel, with other kernel developers contributing to its initial development  Git is a distributed version-control system for tracking changes in source code during software development.  It is designed for coordinating work among programmers, but it can be used to track changes in any set of files.
  • 15. Créer une « Scratch Org »
  • 17. Scratch Org Click « view » menu and « Command Palette » Menu
  • 18. Scratch Org Enter « SFDX » and click « Create Project » WARNING « Create project with manifest » is for sandbox or dev org
  • 19. Scratch Org Fill the project Name
  • 22. Great, you have created your first project… Now you could create the org  Scratch Org
  • 23. Scratch Org Enter « SFDX Auth» and click « Authorize a Dev Hub »
  • 24. Scratch Org Login URL opens automatically After login, you can close the window  Enter the login and password of your DevHub !
  • 25. Scratch Org Enter « SFDX Create » and click « Create a Default Scratch Org… »
  • 26. Scratch Org Enter « SFDX Open » and click « Open Default Org »
  • 27. Scratch Org Org is open automaticly in your browser
  • 28. Scratch Org Your org is ready. You can navigate and configure org
  • 29. Scratch Org Summary  Create Project  Fill Name and select directory  You can here setup « configuration file »  Connect project to the devHub  Create Org  Fill the alias and the validity  Open Org
  • 31. Go further This is a prerequisite if you want to install an AppExchange  sfdx force:user:password:generate -u MyAliasName Change user password
  • 32. Go further  Editions  Developer, Enterprise, Group, Professional  Features  Communities, ServiceCloud, Chatbot, etc…  Settings  omniChannelSettings, caseSettings  Org Preferences  networksEnabled, s1DesktopEnabled Scratch Org Definition Configuration Values https://sforce.co/2IaDgcC
  • 33. Go further With the « .forceignore » file, you can exclude metadata from your project Exclude metadata
  • 34. Go further You can retrieve or send metadata to your org with this following command :  Status  View All changes  Retrieve  Pull Source from default Scratch Org  Send  Push Source to default Scratch Org Retrieve metadata
  • 35. Go further Export & Import  Export data  sfdx force:data:tree:export –q "SELECT Name FROM Account WHERE Name != NULL“ -d ./data  The option « -q » defines that it is a ‘query’  The option « -d » defines the output file path  Export data (multiple releated object)  sfdx force:data:tree:export -q "select Name, (Select FirstName, LastName,Email from Contacts), (Select Name, CloseDate, StageName, Amount from Opportunities), (Select CaseNumber, Status, Priority from Cases) from Account" -d ./data  Import data  sfdx force:data:tree:import --sobjecttreefiles data/Account.json
  • 36. Go further CLI : help for command sfdx force:source -h sfdx force -h sfdx force:source:push -h
  • 37. Go further Execute Anonymous Code  Open the apex script file  Execute Anonymous Apex with Editor Contents
  • 38. Go further Run SOQL Query  Open the SOQL script File  Refresh SObject Definitions  Select the query  Execute SOQL Query with Currently Selected Text
  • 40. Conclusion Summary base command Commande Commentaires sfdx force:auth:web:login -d -a DevHub Connect to the DevHub sfdx force:project:create -n ProjectName Create project Cd FolderName Access to the folder sfdx force:org:create -s -f config/project-scratch-def.json -a ProjectAlias Create scratch org (and name it) sfdx force:apex:class:create -n AccountController -d force-app/main/default/classes Create an Apex Class (and name it) sfdx force:source:push Push metadata to the org sfdx force:org:open Open org in your browser sfdx force:source:pull Load metadata (in your computer) sfdx force:data:tree:export -q "SELECT Name FROM Account " -d ./data Export data sfdx force:data:tree:import --sobjecttreefiles data/Account.json Import data
  • 41. Conclusion Trailhead  sfdx is passionate about you. If you want to know more, Trailhead is your best friend https://sforce.co/2VapNHd
  • 42. Conclusion References  Salesforce DX CLI (download page) https://sforce.co/2vyFuuY  Salesforce CLI Command Reference https://sforce.co/2pdPEAe  Salesforce DX Developer Guide https://sforce.co/2HBToov  Trailhead : Salesforce DX Trail https://sforce.co/2VapNHd
  • 43.
  • 45. Quel était le sujet du jour ?  Comment préparer des crêpes  Comment utiliser Salesforce  Comment utiliser VS Code pour gérer des scratch Org  Comment utiliser SFDX Quiz 1/5
  • 46. Qu'est-ce qu'une scractch Org ?  Un environnement de développement  Un environnement de Sandbox  Un environnement éphémère et complètement personnalisable  Quelque chose d'autre ? Quiz 2/5
  • 47. Comment faire une récupération en local des métadonnées de notre scratch org ?  SFDX Pull  SFDX Push  SFDX retrieve  Ant retrieve Quiz 3/5
  • 48. Quel menu me permet d'accéder au multiple commande ?  Menu Command Palette  Menu Open  Menu Run  Menu Preference Quiz 4/5
  • 49. Quel commande me permet de créer une scratch Org  New Scratch Org  Create Project with Manifest  Create Project  Open default Org Quiz 5/5

Editor's Notes

  1. Salesforce DX introduit un nouveau type d’environnement: les scratch org Ce sont des org pilotés par les sources et pouvant être utilisés pour piloter le développement, les tests et l'intégration continue. Vous pouvez rapidement créer une scratch org dédiée pour tester votre code et, une fois vos modifications validées, vous pouvez utiliser vos propres outils d'intégration continue pour tester et promouvoir immédiatement votre code. Dès que vos tests sont réussis, vous pouvez fusionner votre branche, créer des packages et les déployer pour les tests finaux.
  2. Une scratch org est un environnement Salesforce. Une scratch org est entièrement configurable Ce qui permet aux développeurs d'émuler différentes éditions de Salesforce Avec différentes fonctionnalités et préférences. Organisation Ephémère (validité de 1 à 30 jours) Vous pouvez partager le fichier de configuration de l'organisation de travail avec d'autres membres de l'équipe Afin que vous disposiez tous de la même organisation de base pour effectuer votre développement.
  3. Les « Scratch org » sont de nouveaux environnements
  4. Activez Dev Hub dans votre organisation pour pouvoir créer et gérer des organisations à partir de SFDX. Les scratch org sont des organisations à usage unique destinées à prendre en charge le développement et les tests.
  5. Salesforce CLI est une interface de ligne de commande puissante qui simplifie le développement et l’automatisation de la construction lors de l’utilisation de votre organisation Salesforce.
  6. Ce pack d'extension comprend des outils de développement pour la plate-forme Salesforce dans l'éditeur de VS Code. Ces outils fournissent des fonctionnalités pour travailler avec les organisations de développement. (organisations scratch, sandbox et organisations DE), Apex, les composants Aura et Visualforce.
  7. Git a été créé par Linus Torvalds en 2005 pour le développement du noyau Linux. D'autres développeurs du noyau ont contribués à son développement initial. Git est un système de contrôle de version distribué permettant de suivre les modifications du code source au cours du développement du logiciel. Il est conçu pour coordonner le travail des programmeurs, mais il peut être utilisé pour suivre les modifications dans n’importe quel ensemble de fichiers.
  8. C’est super d’avoir une org, mais pour les données, je dois tout recréer ? La réponse est « NON » Salesforce DX dispose de fonctionnalités permettant de faire des exports et des imports