SFDX on any org (preview)

Did you miss all the sfdx goodness on your developer org? Me too.

I have just one partner org, but have tens of them on dev edition. This meant either using the workbench, or switching to default IDE on Eclipse.

Ugh.. what is this – 2017?

I was quite excited to see the preview feature of SFDX that opens up any developer org. I hope you reread the “preview” part there? Getting started is quite easy and deploying changes to any org is enabled in 10 steps.

  1. Open your favourite command panel. Update SFDX to the latest version. Skip if you are on the bleeding edge already.
  2. Get yourself to preview version.
  3. Open settings in Code (‘Ctrl + ,’). Change the following setting.

    vs code sfdx for any dev org settings
  4. Create new project. Ctrl + Shift + p | Type following command. Code will ask you for the folder in which the metadata will be stored.
  5. Force SFDX to use a specific API version. Open terminal within Code (Ctrl +~) and enter following command.
  6. Authorise org. This command will open the browser, and take you to SFDC login page to enter id and password.
    sfdx authorize org
  7. Right click on manifest > package.xml file and hit ‘sfdx: Retrieve Source from Org’
    sfdx retrieve metadata
  8. Make any changes to files. Deploy changes by right clicking on the file and selecting the obvious option, or using sfdx commands.
  9. This is important: enjoy coding salesforce!
  10. More important: enjoy some more coffee

I bet you already knew that you can execute anonymous blocks of code by just selecting the text, hitting Ctrl + Shift + p, and selecting ‘SFDX: Execute Anonymous Apex with Currently Selected Text’?

btw.. don’t use it on your production environment just yet. Remember the talk about this feature being ‘preview’?

Leave a Reply

avatar
  Subscribe  
Notify of