Code Builder

Powered by its own virtual machine, Code Builder is one of Salesforce’s newest additions to enhance developer productivity, by unleashing the power of Salesforce Extensions for VS Code and offering the same great features as the desktop version – all while running on the cloud. The same interface and functionalities are brought to your browser with Code Builder in a style specifically designed for Salesforce development.

If you’re familiar with VS Code, you will encounter Code Builder pretty alike, and be able to switch between these IDEs without missing a beat!

Accessing Code Builder

An org is required to access Code Builder. In my case, I used a brand-new Playground just for the sake of testing. After connecting the account, the installation process was relatively easy – Code Builder comes as a managed package available for free in the App Exchange store, having everything you need: VS Code, Salesforce Extensions, and CLI. If you’re testing it in an org with various users, make sure to assign the correct permission set so they can have access to the addition.

No alt text provided for this image

First Impressions

The first thing that springs to mind when entering Code Builder is the strong resemblance it has with VS Code – after all, it is built on Microsoft’s Visual Studio Codespaces.

No alt text provided for this image

The interface is divided into five main areas: Activity bar, to switch between different views; Side Bar, containing different views to assist you while working on your project; Editors, to edit your files; Panel, to show output or debug information, errors, and warnings or an integrated terminal; Status Bar, to show information about the current project and files you’re editing. 

No alt text provided for this image

The Amazingly Useful SOQL Query Builder

Code Builder incorporates many unique and cutting-edge features. The first one, and the one that stood out to me the most, was the improved and imported from Workbench tool SOQL Query Builder. This addition gives anyone who needs to develop and run SOQL queries the ability to do so with ease, while also enabling direct query syntax editing for more sophisticated functionality. With the help of SOQL Query builder, anyone can create, execute, and study query results graphically, eliminating any uncertainty when constructing your desired queries. This engine includes the following useful query statements:

  • FROM clause for only one sObject type,
  • SELECT clause to pick fields from the selected sObject, or COUNT() to perform an aggregation of the results,
  • WHERE clause to filter your data,
  • ORDER BY clause with support for ASC, DESC, NULLS FIRST, and NULLS LAST,
  • LIMIT clause.

Link Multiple Salesforce Orgs

As in VS Code, you’re able to link your org in Code Builder. You can create or connect multiple orgs, of any type, including sandboxes, scratch org, or directly against production. Additionally, it may be used to test changes in scratch orgs and automate deployments between different orgs. Furthermore, this powerful feature has source control integration, making source-driver development more convenient to use.

Your Metadata; Anywhere, Anytime

The ability to access all of an org’s metadata is one of Code Builder’s most fascinating features: any metadata type can be opened for examination and modification using the Org Browser. You can retrieve it by selecting the icon to fetch all components of the type or a single component, In addition, any modifications you make to your metadata are immediately stored in your org.

Developing in a Single Environment

Previously, Apex developers could choose between the robust VS Code Salesforce Extensions and the compact and easy-to-use Developer Console: you had a distinct set of talents accessible based on your choice. With Code Builder, you no longer have to feel obliged to work with one in particular – you can do nearly everything, including using Apex Debugger, a tool that was only available on VS Code.

Onwards with LWC

Another feature to highlight is the support for the LWC programming model, paired with the IntelliSense autocomplete. Since Code Builder has the same extensions used on desktop VS Code, you are going to be able to comfortably create, test, and deploy changes originating from Apex and LWC, with no setup required. Moreover, it provides support for Java and node.js, all without leaving the browser.

The Practical and Useful Salesforce CLI

The iconic Salesforce Command Line tool is pre-installed in Code Builder. Within it, you will be able to run all of the Salesforce CLI commands, including the useful and essential sf commands, by using the Code Builder terminal. By taking advantage of those commands, you will be able to save files to the disk, which are persisted for the next time you come back and resume your work. Additionally, bookmark your development environment so you may return to it later in order to continue working on your code from a different computer, for instance.

GitHub Integration, a must-have

Last but not least, the in-built integration with GitHub is key to Code Builder’s success. When you first enter Code Builder, you’re prompted to create a new Salesforce project or import an existing project from GitHub. After authorizing the development environment, you’re off to a great coding session!

The Exciting Future of Code Builder

After reviewing the main features of Code Builder, some doubts might arise. The future of Salesforce web tools is becoming clearer, as the CRM bets for simplicity, practicality, and declarative tools whenever possible. As some of their developers said, “Our strategy is to have one set of IDE extensions that customers can access from either VS Code or Code Builder. Hence, we will continue to build and maintain the Salesforce Extensions pack to support both VS Code on desktop and Code Builder in the browser”.

Regarding the Developer Console, which is rumored to be removed in the near future, “We know you love the speed and simplicity of the Developer Console, but you also want the ability to build more productively, with code completion, refactoring, and powerful debugging. […] Over the next year or so, we’ll provide builders and developers a unified experience, bringing the features they love from Developer Console and Workbench into Code Builder and desktop VS Code. […] Desktop and web tools for Salesforce will get all the same features”.

Personal Thoughts

From my point of view, Code Builder is an amazing tool that I will be using on a daily basis. However, since the feature is still in development, it has some limitations and bugs. For instance, there are some issues with CLI autocomplete, LWC Local Development (and Mobile Preview), and importing GitHub projects. Another remarkable downside derived due to the project being in the Beta phase is the usage of Code Builder. There is a limitation of 20 hours within 30 days, which for some developers might not be enough to test the entirety of Code Builder. However, you can launch another org, download the managed package there and you will have another fresh 20 hours at your disposal.

No alt text provided for this image

In summary, despite the existence of a few known bugs and limitations, Code Builder shows great potential as being the main developing tool for many programmers. Not only as a substitute for the Developer Console but also as a great tool to work in parallel to VS Code. The ability to work from anywhere, on the browser, within the org in which you are making the changes, is a great step forward from Salesforce. I’m sure many more will come – pointing Code Builder as a reference tool in the vast world of Salesforce development.


No Comments

Sorry, the comment form is closed at this time.