Follow and complete a Learn MOAR Summer ’22 trailmix for admins or developers by July 31, 2022, 11:59 pm PT to earn a special community badge and enter for a chance to win one of five $200 USD Salesforce Certification vouchers. Restrictions apply. Learn how to participate and review the Official Rules by visiting the Trailhead Quests page.
The Summer ’22 release brings with it a number of updates to our developer tooling that will help increase your productivity and developer experience. From VS Code Extension updates to some brand new features, the future is bright for Salesforce Developers. Let’s take a look at all of the new features that developers can use as they extend Salesforce with code.
VS Code Extension updates
At Salesforce, we strive to continually improve and update our developer tools to ensure that you have the best developer experience possible. You can keep up to date with the latest changes right in the the salesforcedx-vscode repo on GitHub by checking out the change log.
Rename Component command
Lighting Component developers have been waiting for the ability to rename the Lighting Web Components and Aura Components inside of a project. With the new Rename Component command, it’s easy!
All you have to do is right-click the directory of a Lighting Component and select SFDX: Rename Component. Here you will be able to provide a name, and all of the files will be renamed.
Enhanced support for Anonymous Apex
There are some great enhancements to Apex in VS Code. One highly requested feature is now available: Autocomplete Support in .apex files! This is a huge time saver for developers and should provide a great productivity boost.
We know that Salesforce developers use Anonymous Apex to test code without the need to deploy it. Without autocomplete, this can become a daunting task. That’s why we have also added autocomplete support for Anonymous Apex classes in VS Code. On top of this, you can now click on the Execute Anonymous Apex code lens that will appear at the top of your file.
Apex Replay Debugger — the easy way
A lot of developers have adopted the Replay Debugger, however, using it has always involved quite a few steps. It required you to turn on trace flags, execute your code to generate a debug log, and then launch the Replay Debugger with your log file. Well, now you can step directly into the Replay Debugger right from your Anonymous Apex file or your test class! To get started, all you have to do is open the command pallet while in your test or launch it right from your file.
Manifest Builder
The Manifest Builder is here to help you more easily create your manifests (or package.xml
as you may currently know it). It lists out specific metadata components or types that you can use to deploy large chunks of metadata at the same time. The Manifest Builder extension will allow you to select specific files that you would like to deploy, right from the Explorer view.
Custom Templates for your Create Commands
Have you always wanted your own boilerplate code to appear in source files when you create a metadata object like an Apex class? Well, now you can use custom templates to do just that. We have added the ability for you to customize the templates used behind-the-scenes for your common SFDX: Create Apex Class
, SFDX: Create LWC Component
, SFDX: Create Aura Component
and other creation tasks in VS Code.
Templates are essentially folders with files that contain your custom code. You can check out our sample git repo that a collection of official Salesforce templates for metadata components. Simply clone this repo, keeping the same folder structure, then update relevant template files with your code. Remove the files that you don’t wish to override and you will have your own custom template ready to go.
CLI updates
It’s also worth mentioning some notable CLI updates from this release. After a successful beta and incorporating feedback from our community, the following commands that used to be in the force:mdapi:beta
topic are now generally available:
force:mdapi:deploy
force:mdapi:retrieve
force:mdapi:deploy:report
force:mdapi:retrieve:report
force:mdapi:convert
What does this mean? The functionality we added to force:mdapi:beta:deploy
, for example, is now in force:mdapi:deploy
. The functionality in the old force:mdapi:deploy
is now in force:mdapi:legacy:deploy
. In the short term, you can use these force:mdapi:legacy
commands if you run into issues with the new commands. The new commands are open-source and live in the plugin-source plug-in.
Learn MOAR this week
Product Managers and the Developer Relations team are back to share the latest features and functionality in Summer ‘22. To help you develop faster, new content from Developer Relations will cover their favorite new features. Also, be sure to check out Release Readiness Live on Friday, May 20, 2022 at 9:00 a.m. PST. Lastly, keep an eye on the Salesforce Developers blog every day this week for more posts on Summer ’22!
To learn even more, check out the Summer ’22 trailmix.
About the author
Stephan Chandler-Garcia is a Senior Developer Evangelist at Salesforce. He focuses on application development, security, and Experience Cloud. You can follow him on Twitter @stephanwcg.