The online sandbox is an environment deployed as a Dynamics 365 Business Central service (SaaS). You can activate the online sandbox only from a production environment, by selecting Sandbox
in the search box and clicking on the first choice (Sandbox Environment).
When the creation wizard starts, click Create
:
A new browser window will open, and the sandbox creation process starts. At the end of this process, you have a welcome page that shows that the sandbox environment is ready. To start working with the online sandbox, click on the Close
button:
When creating the online sandbox, a new Dynamics 365 Business Central tenant is deployed, and this tenant is created with a default demonstration company (CRONUS). At the moment, there isn't an option for copying data from the production tenant to the online sandbox.
You can reset your online sandbox environment at any time. Remember that resetting the sandbox will completely remove and recreate it with demonstration data. You can switch...
With the Azure-hosted sandbox option, you can create a Dynamics 365 Business Central sandbox on an Azure Virtual Machine, by using a predefined template. This template gives you the option to create an Azure VM with Docker as the infrastructure for the container-based application is automatically configured. Obviously, this option requires that you have an active Azure subscription, and each sandbox has its costs in terms of Azure resources.
To create an Azure-hosted Dynamics 365 Business Central sandbox, select the Sandbox Environment (Container)
option as shown and then select Host in Azure
:
After clicking this button, you will be redirected to your Azure portal account, and the template for the Azure Virtual Machine will be provided:
In this template, you with need to select a Resource group
(or create a new one), select the VM name and the VM admin password (used also for connecting to the Docker-based instance of Dynamics 365 Business Central), select Accept Eula
is...
A local-hosted Dynamics 365 Business Central sandbox requires that you have a machine running Windows 10 or Windows Server 2016, with Docker installed and running.
Docker for Windows can be installed from the following link: https://www.docker.com/docker-windows.
Run the installer with administrator privileges. After installation, check that Docker is running Windows Container (right click on the Docker icon in the task bar):
On your Windows Settings
, check that you've enabled the PowerShell execution script option:
A local-hosted sandbox can be created by selecting the Sandbox Environment (Container)
option as shown and then selecting Host locally
:
At this point, you will be asked to download and save a Powershell script file called CreateBCSandbox.ps1
.
After saving it, start Powershell ISE with administrator privileges and open that file.
In this Powershell script, you've simply to set these parameters:
- Set the
$containername
variable to the name of your Dynamics 365 Business...
Manually creating a sandbox based on Docker
You can also create a Dynamics 365 Business Central sandbox environment without using the sandbox links to the Business Central production tenant, but instead using custom scripts for creating Docker-based sandboxes hosted locally or on Azure Container Instances.
Steps for manually creating a locally hosted Dynamics 365 Business Central sandbox
After installing Docker for Windows on your local machine, you can manually create a Docker-based Dynamics 365 Business Central container by running a script that pulls a container image from the Docker hub.
From Command Prompt, you can execute the following command:
docker run -m 4G -e ACCEPT_EULA=Y -e UseSSL=N microsoft/bcsandbox:latest
This will create a Dynamics 365 Business Central container with the latest image available.
If you want to create a sandbox with a particular localization (for example, IT), you can run the following command:
docker run -m 4G -e ACCEPT_EULA=Y -e UseSSL=N microsoft/bcsandbox:it...
In this chapter, we saw the various options for creating a sandbox environment for working and developing with Dynamics 365 Business Central. This is the starting point for a development environment, where we can connect with Visual Studio Code, publish, deploy, and debug extensions.
In Chapter 5, Developing an Extension with AL and VS CODE, we'll see how to create a real-world extension for Dynamics 365 Business Central by using the AL language and Visual Studio Code.