More Related Content Similar to Salesforce CLI (20) More from Keir Bowden (20) Salesforce CLI2. About Me
☑ CTO of BrightGen
☑ Salesforce MVP
☑ Certified Technical Architect
3. ☑ Prime Minicomputer - PrimeOS
☑ VAX Minicomputer - VMS
☑ HP 9000 - HP UX (Unix)
☑ IBM RS/6000 - AIX (Unix)
4. Salesforce CLI
☑ sfdx executable
☑ Local installation
☑ Part of SalesforceDX
☑ One tool to rule them all
5. Authorisation
☑ Login once
☑ CLI manages all tokens
☑ Authorise through browser :
sfdx force:auth:web:login
☑ Specify existing with -u
sfdx force:org:open -u keir.bowden@sfdx.deploy
7. Deployment
☑ Wait for complete
sfdx force:mdapi:deploy -d src -w 2
☑ Poll
sfdx force:mdapi:deploy -d src
sfdx force:mdapi:deploy:report -i <job>
8. Running Tests
☑ All in your namespace
sfdx force:apex:test:run -l RunLocalTests
☑ Specific Tests
sfdx force:apex:test:run -l
RunSpecifiedTests -t ConfigAccessorTest
10. Retrieving
Metadata
☑ Wait for complete
sfdx force:mdapi:retrieve
-k retrieve/package.xml -r .
☑ Poll
sfdx force:mdapi:retrieve
-k retrieve/package.xml -r . -w 0
sfdx force:mdapi:retrieve:report
-i <jobId> -r .
13. Updating Data ☑ sfdx force:data:record:update -s <type> -i
<id> -v "<field>=<value> <field>=<value>"
14. Creating
Metadata
☑ Apex Class:
sfdx force:apex:class:create -n <name>
-d <directory>
☑ Lightning Component
sfdx force:lightning:component:create
-n <name> -d <directory>
☑ Visualforce Page
sfdx force:visualforce:page:create
-n <name> -d <directory>
☑ No -u option
Created on local file system only
19. More
Information
☑ Home page : sforce.co/2vyFuuY
☑ Setup guide: sforce.co/2FIDlpS
☑ Command reference : sforce.co/2pdPEAe
☑ Release notes : sforce.co/2DWaWH7
☑ Blog series : bobbuzz.me.uk/2GvVaIb