SlideShare a Scribd company logo
1 of 17
SALESFORCE
DEPLOYMENTS
Mehdi Maujood
WITH
VISUAL STUDIO CODE
AND
SALESFORCE CLI
ABOUT ME
Salesforce Application Engineer @ Meta
Salesforce Author @ Pluralsight
www.apexsandbox.io
SF DEPLOYMENTS WITH VS CODE & CLI 2
AGENDA
Install VS Code, CLI, Extensions
Creating Projects and Connecting to Orgs
Retrieving Metadata
Deploying Metadata
Fun with Package.xml
SF DEPLOYMENTS WITH VS CODE & CLI 3
INSTALLATION
Install Visual Studio Code
https://code.visualstudio.com/download
Install Salesforce CLI
https://developer.salesforce.com/tools/salesforcecli
Once installed, open a terminal and run `sf –-version` to verify
Install Salesforce Extension Pack for VS Code
1. Open VS Code
2. Ctrl+Shift+X or click “Extensions” on the left pane
3. Search for “Salesforce Extension Pack” and click install
SF DEPLOYMENTS WITH VS CODE & CLI 4
UNDERSTANDING THE SALESFORCE CLI
COMMAND LINE
INTERFACE
Graphical User Interfaces are
point-and-click interfaces
Application Programming
Interfaces are for other
applications
Command Line Interfaces are
for accessing a system through
the command line
SALESFORCE
EXTENSIONS + CLI
The Salesforce Extensions for
VS Code run CLI commands in
the background for many
operations
CLI REFERENCE
Check the docs to see what
commands you can run
https://developer.salesforce.co
m/docs/atlas.en-
us.sfdx_cli_reference.meta/sfdx
_cli_reference/cli_reference_un
ified.htm
SF DEPLOYMENTS WITH VS CODE & CLI 5
CREATE AN
SFDX PROJECT
Most Salesforce CLI commands only work
within an SFDX Project
An SFDX Project is just a folder with a
specific structure and some specific files
CREATE AN SFDX PROJECT
STEP 1
In VS Code, press
Ctrl + Shift + P
(windows)
Cmd + Shift + P
(mac)
STEP 2
Type and select
`SFDX: Create
Project with
Manifest`
STEP 3
Enter a project
name
STEP 4
Select a folder in
which the project
should be created
STEP 5
Make sure the
project is open in
VS Code
SF DEPLOYMENTS WITH VS CODE & CLI 7
WHAT’S IN THE
PROJECT?
SF DEPLOYMENTS WITH VS CODE & CLI 8
force-app/main/default
This folder contains all metadata, e.g. objects, fields, classes, flows.
manifest/
This folder contains a file called package.xml, which we will learn a lot
about later
A lot of other stuff
We normally don’t need to touch any of the other stuff.
AUTHORIZE AN
ORG
To retrieve metadata, you first need to
connect the Salesforce CLI to an org
To deploy metadata, you need to connect
Salesforce CLI to yet another org
CONNECT TO AN ORG
STEP 1
Get your
username,
password and
login URL
You may need to
get the login URL
from Setup > My
Domain > Current
My Domain URL
STEP 2
Open the command
palette (Ctrl/Cmd +
Shift + P)
Type and select
`SFDX: Authorize
an Org`
STEP 3
Follow the prompts.
If using custom
login URL, enter
https://<My
Domain URL>
STEP 4
Wait for a browser
window to pop up,
and log into the
org.
Click “Allow” in the
browser window
when prompted
STEP 5
Your org is
connected!
Run `sf org list` to
see a list of all
authorized orgs
Check the bottom-
left of your window
to see it on the UI
SF DEPLOYMENTS WITH VS CODE & CLI 10
RETRIEVE
SOME
METADATA!
There are many ways to do this. Comes
down to three steps:
1. Specify what metadata needs to be
retrieved
2. Specify what org/connection to retrieve
the metadata from
3. Retrieve the metadata
RETRIEVE METADATA
SF DEPLOYMENTS WITH VS CODE & CLI 12
There are multiple ways to retrieve metadata
1. Run a CLI Command to retrieve specific metadata
2. Use the Org Browser to retrieve metadata
3. List the metadata in package.xml and retrieve it
4. Generate a package.xml with EVERYTHING and
retrieve it all!
Once retrieved, check the force-app folder for the
retrieved XML
SF DEPLOYMENTS WITH VS CODE & CLI 13
sf project generate manifest --from-org <org alias> -n allMetadata -d manifest
DEPLOY SOME
METADATA!
Once again, multiple ways to do this.
Comes down to three steps:
1. Specify what metadata needs to be
deployed
2. Specify what org/connection to deploy
the metadata to
3. Deploy the metadata
DEPLOY METADATA
SF DEPLOYMENTS WITH VS CODE & CLI 15
There are multiple ways to deploy metadata to an org
1. Run a CLI Command to deploy specific metadata
2. Right-click + deploy directly on a file or folder
3. List the metadata in package.xml and deploy it
RETRIEVE/DEPLOY DEMO
SF DEPLOYMENTS WITH VS CODE & CLI 16
Source org: empathetic-raccoon
Target org: playful-shark
Metadata:
• Robot__c custom object, custom fields, custom
tab, page layouts, sharing rules, trigger, and
custom fields
• Globomantics Basic Access permission set
THANK YOU
Mehdi Maujood
https://www.linkedin.com/in/maujood/
PRESENTATION TITLE 17

More Related Content

Similar to Deployments with VS Code and Salesforce CLI

Advanced Search with Solr - User Guide
Advanced Search with Solr - User GuideAdvanced Search with Solr - User Guide
Advanced Search with Solr - User GuideBiztech Store
 
Salesforce Admin's guide : the data loader from the command line
Salesforce Admin's guide : the data loader from the command lineSalesforce Admin's guide : the data loader from the command line
Salesforce Admin's guide : the data loader from the command lineCyrille Coeurjoly
 
Salesforce ANT migration
Salesforce ANT migration Salesforce ANT migration
Salesforce ANT migration Cloud Analogy
 
Plugins 2.0: The Overview
Plugins 2.0: The OverviewPlugins 2.0: The Overview
Plugins 2.0: The Overviewmrdon
 
Firefox security (prasanna)
Firefox security (prasanna) Firefox security (prasanna)
Firefox security (prasanna) ClubHack
 
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 ☁
 
MAX 2008 - Building your 1st AIR application
MAX 2008 - Building your 1st AIR applicationMAX 2008 - Building your 1st AIR application
MAX 2008 - Building your 1st AIR applicationrtretola
 
IEDOTNETUG Silverlight Class Week 6
IEDOTNETUG Silverlight Class Week 6IEDOTNETUG Silverlight Class Week 6
IEDOTNETUG Silverlight Class Week 6iedotnetug
 
User and group security migration
User and group security migrationUser and group security migration
User and group security migrationAmit Sharma
 
N-Tier Application with Windows Forms - Deployment and Security
N-Tier Application with Windows Forms - Deployment and SecurityN-Tier Application with Windows Forms - Deployment and Security
N-Tier Application with Windows Forms - Deployment and SecurityPeter Gfader
 
SFDX - Spring 2019 Update
SFDX - Spring 2019 UpdateSFDX - Spring 2019 Update
SFDX - Spring 2019 UpdateBohdan Dovhań
 
Introduction to Android Development Latest
Introduction to Android Development LatestIntroduction to Android Development Latest
Introduction to Android Development LatestProf. Erwin Globio
 
Code repository management
Code repository managementCode repository management
Code repository managementCloud Analogy
 
MuleSoft Surat Live Demonstration Virtual Meetup#3 - Building JWT OAuth 2.0 C...
MuleSoft Surat Live Demonstration Virtual Meetup#3 - Building JWT OAuth 2.0 C...MuleSoft Surat Live Demonstration Virtual Meetup#3 - Building JWT OAuth 2.0 C...
MuleSoft Surat Live Demonstration Virtual Meetup#3 - Building JWT OAuth 2.0 C...Jitendra Bafna
 
Selenium with testng and eclipse ide
Selenium with testng and eclipse ideSelenium with testng and eclipse ide
Selenium with testng and eclipse ideTestertester Jaipur
 
Inventory your network and clients with PowerShell
Inventory your network and clients with PowerShellInventory your network and clients with PowerShell
Inventory your network and clients with PowerShellConcentrated Technology
 
An Introduction to Maven and Flex
An Introduction to Maven and FlexAn Introduction to Maven and Flex
An Introduction to Maven and FlexJustin J. Moses
 
Selenium tools-installation
Selenium tools-installationSelenium tools-installation
Selenium tools-installationITeLearn
 

Similar to Deployments with VS Code and Salesforce CLI (20)

Advanced Search with Solr - User Guide
Advanced Search with Solr - User GuideAdvanced Search with Solr - User Guide
Advanced Search with Solr - User Guide
 
Salesforce DX for admin
Salesforce DX for adminSalesforce DX for admin
Salesforce DX for admin
 
Salesforce Admin's guide : the data loader from the command line
Salesforce Admin's guide : the data loader from the command lineSalesforce Admin's guide : the data loader from the command line
Salesforce Admin's guide : the data loader from the command line
 
Salesforce ANT migration
Salesforce ANT migration Salesforce ANT migration
Salesforce ANT migration
 
Plugins 2.0: The Overview
Plugins 2.0: The OverviewPlugins 2.0: The Overview
Plugins 2.0: The Overview
 
Wordpress as a framework
Wordpress as a frameworkWordpress as a framework
Wordpress as a framework
 
Firefox security (prasanna)
Firefox security (prasanna) Firefox security (prasanna)
Firefox security (prasanna)
 
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
 
MAX 2008 - Building your 1st AIR application
MAX 2008 - Building your 1st AIR applicationMAX 2008 - Building your 1st AIR application
MAX 2008 - Building your 1st AIR application
 
IEDOTNETUG Silverlight Class Week 6
IEDOTNETUG Silverlight Class Week 6IEDOTNETUG Silverlight Class Week 6
IEDOTNETUG Silverlight Class Week 6
 
User and group security migration
User and group security migrationUser and group security migration
User and group security migration
 
N-Tier Application with Windows Forms - Deployment and Security
N-Tier Application with Windows Forms - Deployment and SecurityN-Tier Application with Windows Forms - Deployment and Security
N-Tier Application with Windows Forms - Deployment and Security
 
SFDX - Spring 2019 Update
SFDX - Spring 2019 UpdateSFDX - Spring 2019 Update
SFDX - Spring 2019 Update
 
Introduction to Android Development Latest
Introduction to Android Development LatestIntroduction to Android Development Latest
Introduction to Android Development Latest
 
Code repository management
Code repository managementCode repository management
Code repository management
 
MuleSoft Surat Live Demonstration Virtual Meetup#3 - Building JWT OAuth 2.0 C...
MuleSoft Surat Live Demonstration Virtual Meetup#3 - Building JWT OAuth 2.0 C...MuleSoft Surat Live Demonstration Virtual Meetup#3 - Building JWT OAuth 2.0 C...
MuleSoft Surat Live Demonstration Virtual Meetup#3 - Building JWT OAuth 2.0 C...
 
Selenium with testng and eclipse ide
Selenium with testng and eclipse ideSelenium with testng and eclipse ide
Selenium with testng and eclipse ide
 
Inventory your network and clients with PowerShell
Inventory your network and clients with PowerShellInventory your network and clients with PowerShell
Inventory your network and clients with PowerShell
 
An Introduction to Maven and Flex
An Introduction to Maven and FlexAn Introduction to Maven and Flex
An Introduction to Maven and Flex
 
Selenium tools-installation
Selenium tools-installationSelenium tools-installation
Selenium tools-installation
 

Recently uploaded

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 

Recently uploaded (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 

Deployments with VS Code and Salesforce CLI

  • 2. ABOUT ME Salesforce Application Engineer @ Meta Salesforce Author @ Pluralsight www.apexsandbox.io SF DEPLOYMENTS WITH VS CODE & CLI 2
  • 3. AGENDA Install VS Code, CLI, Extensions Creating Projects and Connecting to Orgs Retrieving Metadata Deploying Metadata Fun with Package.xml SF DEPLOYMENTS WITH VS CODE & CLI 3
  • 4. INSTALLATION Install Visual Studio Code https://code.visualstudio.com/download Install Salesforce CLI https://developer.salesforce.com/tools/salesforcecli Once installed, open a terminal and run `sf –-version` to verify Install Salesforce Extension Pack for VS Code 1. Open VS Code 2. Ctrl+Shift+X or click “Extensions” on the left pane 3. Search for “Salesforce Extension Pack” and click install SF DEPLOYMENTS WITH VS CODE & CLI 4
  • 5. UNDERSTANDING THE SALESFORCE CLI COMMAND LINE INTERFACE Graphical User Interfaces are point-and-click interfaces Application Programming Interfaces are for other applications Command Line Interfaces are for accessing a system through the command line SALESFORCE EXTENSIONS + CLI The Salesforce Extensions for VS Code run CLI commands in the background for many operations CLI REFERENCE Check the docs to see what commands you can run https://developer.salesforce.co m/docs/atlas.en- us.sfdx_cli_reference.meta/sfdx _cli_reference/cli_reference_un ified.htm SF DEPLOYMENTS WITH VS CODE & CLI 5
  • 6. CREATE AN SFDX PROJECT Most Salesforce CLI commands only work within an SFDX Project An SFDX Project is just a folder with a specific structure and some specific files
  • 7. CREATE AN SFDX PROJECT STEP 1 In VS Code, press Ctrl + Shift + P (windows) Cmd + Shift + P (mac) STEP 2 Type and select `SFDX: Create Project with Manifest` STEP 3 Enter a project name STEP 4 Select a folder in which the project should be created STEP 5 Make sure the project is open in VS Code SF DEPLOYMENTS WITH VS CODE & CLI 7
  • 8. WHAT’S IN THE PROJECT? SF DEPLOYMENTS WITH VS CODE & CLI 8 force-app/main/default This folder contains all metadata, e.g. objects, fields, classes, flows. manifest/ This folder contains a file called package.xml, which we will learn a lot about later A lot of other stuff We normally don’t need to touch any of the other stuff.
  • 9. AUTHORIZE AN ORG To retrieve metadata, you first need to connect the Salesforce CLI to an org To deploy metadata, you need to connect Salesforce CLI to yet another org
  • 10. CONNECT TO AN ORG STEP 1 Get your username, password and login URL You may need to get the login URL from Setup > My Domain > Current My Domain URL STEP 2 Open the command palette (Ctrl/Cmd + Shift + P) Type and select `SFDX: Authorize an Org` STEP 3 Follow the prompts. If using custom login URL, enter https://<My Domain URL> STEP 4 Wait for a browser window to pop up, and log into the org. Click “Allow” in the browser window when prompted STEP 5 Your org is connected! Run `sf org list` to see a list of all authorized orgs Check the bottom- left of your window to see it on the UI SF DEPLOYMENTS WITH VS CODE & CLI 10
  • 11. RETRIEVE SOME METADATA! There are many ways to do this. Comes down to three steps: 1. Specify what metadata needs to be retrieved 2. Specify what org/connection to retrieve the metadata from 3. Retrieve the metadata
  • 12. RETRIEVE METADATA SF DEPLOYMENTS WITH VS CODE & CLI 12 There are multiple ways to retrieve metadata 1. Run a CLI Command to retrieve specific metadata 2. Use the Org Browser to retrieve metadata 3. List the metadata in package.xml and retrieve it 4. Generate a package.xml with EVERYTHING and retrieve it all! Once retrieved, check the force-app folder for the retrieved XML
  • 13. SF DEPLOYMENTS WITH VS CODE & CLI 13 sf project generate manifest --from-org <org alias> -n allMetadata -d manifest
  • 14. DEPLOY SOME METADATA! Once again, multiple ways to do this. Comes down to three steps: 1. Specify what metadata needs to be deployed 2. Specify what org/connection to deploy the metadata to 3. Deploy the metadata
  • 15. DEPLOY METADATA SF DEPLOYMENTS WITH VS CODE & CLI 15 There are multiple ways to deploy metadata to an org 1. Run a CLI Command to deploy specific metadata 2. Right-click + deploy directly on a file or folder 3. List the metadata in package.xml and deploy it
  • 16. RETRIEVE/DEPLOY DEMO SF DEPLOYMENTS WITH VS CODE & CLI 16 Source org: empathetic-raccoon Target org: playful-shark Metadata: • Robot__c custom object, custom fields, custom tab, page layouts, sharing rules, trigger, and custom fields • Globomantics Basic Access permission set