Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Salesforce DX for Accidential Admins


Published on

How can accidential admins use Salesforce DX to be more effective

Published in: Software
  • Be the first to comment

  • Be the first to like this

Salesforce DX for Accidential Admins

  1. 1. Salesforce DX for Accidental Admins Can we steal some good things from developers? @mhumpolec Martin Humpolec, Senior Consultant
  2. 2. Forward-Looking Statements Statement under the Private Securities Litigation Reform Act of 1995: This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of, inc. could differ materially from the results expressed or implied by the forward- looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services. The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of, inc. is included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site. Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available., inc. assumes no obligation and does not intend to update these forward-looking statements.
  3. 3. Meet Martin Humpolec Salesforce Consultant Lightning Champion Trailhead & Certification Addict Prague Salesforce User Group Leader CzechDreamin konference organizer exDeveloper Blogger: Twitter: @mhumpolec
  4. 4. Why adopt What we need to know How to do it
  5. 5. Why steal knowledge from devs
  6. 6. It is good to have a backup
  7. 7. Be super quick
  8. 8. Transpone data in seconds
  9. 9. Import test data in seconds
  10. 10. Skip change sets
  11. 11. It is great to be able to roll back
  12. 12. What we need to learn
  13. 13. IDE Interactive Development Environment
  14. 14. VCS aka GIT Version Control System
  15. 15. CLIs Salesforce CLI • Git CLI • Command Line Interface
  16. 16. Scratch Orgs { "orgName": "Acme", "country": "US", "edition": "Enterprise", "description": "Work Item #12345: add picklist to widget", "hasSampleData": "true", "features": ["MultiCurrency", "AuthorApex"], "orgPreferences": { "enabled": ["S1DesktopEnabled", "ChatterEnabled"], "disabled": ["IsNameSuffixEnabled"] } }
  17. 17. Development Hub
  18. 18. Let‘s do it
  19. 19. Get/Enable Development Hub
  20. 20. Open a terminal and be like a dev
  21. 21. The structure is complex but simple sfdx force:project:create -n Dreamforce18
  22. 22. Login to Dev Hub sfdx force:auth:web:login -d -a DevHub
  23. 23. Login to Dev Hub
  24. 24. And Login to Your Instance sfdx force:auth:web:login -r -a MyOrg
  25. 25. Create a repository
  26. 26. Create a new project • sfdx force:project:create -n Dreamforce18 • git init • git remote add origin <vcs ssh url>
  27. 27. It is good to have a backup
  28. 28. It is good to have a backup
  29. 29. It is good to have a backup
  30. 30. Or create a package
  31. 31. It is good to have a backup
  32. 32. It is good to have a backup
  33. 33. It is good to have a backup • sfdx force:mdapi:retrieve -r ./source -u MyOrg -k ./source/package.xml [-p PackageName] • Unzip the downloaded zip file
  34. 34. Be super quick
  35. 35. Be super quick
  36. 36. Have package.xml with components you want
  37. 37. Be super quick (1)
  38. 38. Be super quick (1) • sfdx force:mdapi:deploy -d ./source
  39. 39. Be super quick (2)
  40. 40. Be super quick (2) • sfdx force:mdapi:convert -r ./source • Update what you want to update right in the file • sfdx force:source:convert -d ./source • sfdx force:mdapi:deploy -d ./source [-o]
  41. 41. Be super quick (more friendly way?) • sfdx force:org:create -f ./config/project-scratch-def.json -a MyScratch • sfdx force:source:push -g -f -u MyScratch • sfdx force:org:open -u MyScratch • Do changes in your org • sfdx force:source:pull -u MyScratch
  42. 42. What can I put in the definition file? AnalyticsSharingEnable AsyncSaveEnabled ChatterEnabled DisableParallelApexTesting EnhancedEmailEnabled EventLogWaveIntegEnabled LoginForensicsEnabled NetworksEnabled NotesReservedPref01 OfflineDraftsEnabled PathAssistantsEnabled S1DesktopEnabled S1EncryptedStoragePref2 S1OfflinePref SelfSetPasswordInApi SendThroughGmailPref SocialProfilesEnable Translation VoiceEnabled API AuthorApex Communities ContactsToMultipleAccounts ContractApprovals CascadeDelete CustomerSelfService CustomApps CustomTabs DebugApex DefaultWorkflowUser ExpandedSourceTracking ExternalSharing (not available in Group Edition) ForceComPlatform MultiCurrency PersonAccounts SalesWave LightningSalesConsole LightningServiceConsole ServiceCloud ServiceWave SiteDotCom Sites StateAndCountryPicklist us.sfdx_dev.meta/sfdx_dev/sfdx_dev_scratch_orgs_def_file_config_values.htm
  43. 43. Transpone data
  44. 44. Transpone data in seconds sfdx force:data:soql:query -q “SELECT Id, BillingCity FROM Account” -r csv > accounts.csv Update the file sfdx force:data:bulk:upsert -s Account -f accounts.csv -i Id
  45. 45. Transpone data in seconds sfdx force:data:soql:query -q “SELECT Id, BillingCity FROM Account” --json | jsonv Id, BillingCity result.records | cat ../data/header.csv - > updates.csv && sfdx force:data:bulk:upsert -s Account -f updates.csv -i Id If You Can Write a Formula Field You Can Use a Command Line, Petter Chittum, London‘s Calling
  46. 46. Import test data in seconds
  47. 47. Import test data in seconds
  48. 48. Skip change sets
  49. 49. Skip change sets • sfdx force:source:convert -d ./source • sfdx force:mdapi:deploy -d ./source -u ProductionOrg
  50. 50. It is great to be able to roll back
  51. 51. It is great to be able to roll back
  52. 52. It is great to be able to roll back • git revert <id> • git push –f OR • git checkout <id> filename
  53. 53. Product Placement bluecanvas Beware!
  54. 54. Product Placement
  55. 55. Product Placement
  56. 56. Product Placement
  57. 57. Product Placement
  58. 58. Product Placement
  59. 59. Resources
  60. 60. Resources • • •
  61. 61. Fancy a sticker? Ask question I‘m able to answer