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.
- Open your favourite command panel. Update SFDX to the latest version. Skip if you are on the bleeding edge already.
- Get yourself to preview version.
sfdx plugins:install salesforcedx@pre-release
- Open settings in Code (‘Ctrl + ,’). Change the following setting.
- Create new project. Ctrl + Shift + p | Type following command. Code will ask you for the folder in which the metadata will be stored.
SFDX: Create Project with Manifest
- Force SFDX to use a specific API version. Open terminal within Code (Ctrl +~) and enter following command.
sfdx force:config:set apiVersion=43.0
- Authorise org. This command will open the browser, and take you to SFDC login page to enter id and password.
- Right click on manifest > package.xml file and hit ‘sfdx: Retrieve Source from Org’
- Make any changes to files. Deploy changes by right clicking on the file and selecting the obvious option, or using sfdx commands.
- This is important: enjoy coding salesforce!
- 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’?