Sfdx introduction

AbdelhakimMouttaqui1 510 views 16 slides Oct 12, 2017
Slide 1
Slide 1 of 16
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16

About This Presentation

Salesforce DX Introduction


Slide Content

Salesforce DX a [email protected] @ adbelhakim https:// www.linkedin.com /in/ abdelhakimmouttaqui / Abdelhakim Mouttaqui Technical Architect & Force.com Developer Casablanca – Oct 11 th 2017

Goals and Audience Discovering a brand new Salesforce Developer eXperience Taking a simple use case’s walk-through steps Laying foundations for future more detailed DX events Needed an intermediate sfdc experience Events  Platform Basics talk

[What] sfdx A new way to manage and develop apps across their entire lifecycle Source-driven development of code Team collaboration with governance Externalizing metadata Letting developers use their modern tools The “source of truth” shifts into a VCS New experiences, including the use of Heroku Flow to drive both CI and CD

[Why] sfdx Solving developer sandbox quick/light rollback for canceled task Lightening developer sandbox setting up time loss Simulating and testing apps on orgs with different features (compared with the “classic” dev sandbox) Creating use-specific orgs for demo purposes

[Why] sfdx CI scenarios : automated testing (e.g. with Jenkins) and optional further deploy to another sandbox

[How] sfdx

Tools - prerequisites Node JS Git Heroku /SFDX CLI

Tools: CLI – Commands Overview sfdx force --help sfdx force:project:create -- projectname milanosfdug sfdx force:mdapi:retrieve -- unpackaged ./ milanodug / package.xml -- retrievetargetdir ./ milanodug /retrieved

Use case - Big Picture

sfdx force:mdapi:retrieve sfdx force:mdapi:convert Retrieving and Converting >> Setting up a package.xml file >> Setting up a target folders for retrieved metadata >> Taking action by CLI

sfdx force:auth:web:login sfdx force:org:create sfdx force:org:create sfdx force:config:list sfdx force:alias:set Authorizing, creating a scratch org, config and alias settings >> Authorizing our devhub (or another org, e.g. for using force:mdapi  scratch orgs not manageable ) >> Check configs >> Creating a new scratch org ( + defaultusername and scratch- def.json ) >> Showing scratch orgs on Env Hub >> Re-Check configs >> Aliases : list, set and how to use them

sfdx force:source:status sfdx force:source:push Checking status and first push >> Checking source status >> Perfoming the first push

sfdx force:data:bulk:upsert sfdx force:data:soql:query sfdx force:schema:sobject:describe Developing, Loading, Querying >> Editing metadata locally >> Loading records from csv >> Querying data

sfdx force:source:pull --force sfdx force:source:push –-force git commit git push Push/Pull, conflicts, remote pushing >> Pushing local edited files >> Pulling remote changes >> Solving conflict >> Pushing to a remote repository >> Destroying the scratch org

Demo