Develop locally using VSCode and the Dynamics365 sandbox

Microsoft released in August last year the possibility to create a cloud-based Sandbox-environment for Dynamics 365. Why is it interesting? The good news are that it is possible to connect from a local VSCode installation and it’s a waltz to set it up. Convenient side effect: keeping the costs of a Azure subscription low.

What’s the sandbox?
The relatively new sandbox-environment is a non-productive environment of Dynamics 365 and Microsoft intentionally created it especially for testing, developing and presenting purposes. Because the sandbox is isolated from the production database, it comes with the well known CRONUS-company as default. It is possible to reset the database back to CRONUS-default or to copy the production-database into the sandbox environment.

How do I get it?
Microsoft provides for each Dynamics 365-subscription one sandbox-environment for free. As presented in this video, it is possible to add additional sandbox-environments for $150/month.

How to connect from VSCode
Just install VSCode on a local machine and install the latest AL-extension (at least 0.13.15836) manually. For whatever reason is the AL-extension in the Marketplace not the latest version delivered with the Development Preview-image. When typing “AL: Go!”, VSCode will prompt you with the selection to connect to “Microsoft cloud sandbox” or “Your own server”. Just select “Microsoft cloud sandbox” and you will be prompted to type in your registered credentials.

vscode server selection

sandbox vscode login

And this is what the launch.json looks like.

vscode sandbox launch_json

When building the extension, VSCode will call the sandbox-environment in the WebClient automatically.

vscode sandbox debug console

Bonus: In the WebClient, you will notice a small symbol in the upper right which resembles a brush and a monitor. This function will open the new Page Designer.

sandbox page design

Leave a Comment

Your email address will not be published. Required fields are marked *