Share This Post

Business Central

Business Central Sandbox Environment for D365

To get started developing for the Dynamics 365 Business Central it is important to understand the different options you have at hand. You can either choose to run a Business Central Sandbox environment deployed as a Dynamics 365 Business Central service, or you can run a container-based image either hosted as an Azure VM or locally. Both options provide the AL development tools; the container-based Business Central sandbox additionally provides access to the C/SIDE development tools. You can also choose to run a Business Central sandbox environment with production data using the Business Central Admin Center.

Business Central Sandbox for D365 Overview

The following topic outlines the most important capabilities on the offered development Business Central sandbox environments for Dynamics 365 Business Central.

Capability Online Sandbox Container Sandbox
Deployment The Dynamics 365 Cloud Service managed by Microsoft  Azure VM or on-premises managed by ISV/VAR
Production data Manually uploaded using Rapid Start packages. Or, available through the Business Central Admin Center.  Manually uploaded using Rapid Start packages
Production services Manually configured  Not available
Cost Part of a Business Central subscription  Locally hosted – free, Azure-hosted – cost incurred
Development Full capabilities of the development environment.
Designer functionality, such as:
Add/Remove components,
Move components,
Set/clear Freeze pane,
Edit captions
 Full capabilities of the development environment.
Designer functionality, such as:
Add/Remove components,
Move components,
Set/clear Freeze pane,
Edit captions
Tools Visual Studio Code, and Designer  Visual Studio Code, Designer, on-premise tools such as SQL Server Management Studio, and C/SIDE.
Debugging Enabled  Enabled
Database access No  Yes
Extensions Must be manually installed.  Must be manually installed.
From AppSource Available.  Not available.
From File Not available.  Available.
From Visual Studio Code Available.  Available.

Choosing an Azure-hosted or local-hosted container sandbox

container sandbox

container sandbox

When you set up the container sandbox, you can choose to host the Business Central sandbox on Microsoft Azure or on a local computer. Both environments offer the same capabilities and use Docker to provide the infrastructure for the container-based applications. The difference is:

  • With Azure hosting, the Docker is installed and configured for you. However, Azure hosting requires that you sign-up for an Azure subscription and additional costs may be incurred for each container Business Central sandbox.
  • Local hosting requires that your computer is running Windows 10 or Windows Server 2016, and you install and configure Docker before setting up the container Business Central sandbox.

Set up an Azure-hosted container sandbox

  1. If you do not already have one, sign up for an Azure subscription.
  2. In Dynamics 365 Business Central, choose the Search for Page or Report icon, enter the SANDBOX ENVIRONMENT (CONTAINER), and then select the relevant link.
  3. Choose Host in Azure. If prompted, enter the user name and password of your Azure subscription. The Azure portal opens to display the custom deployment form.
  4. Fill out the required fields on a form, and then select Purchase.

Set up a local-hosted container sandbox

sandbox environment

sandbox environment

  1. If not already done, install Docker.
  2. In Dynamics 365 Business Central, choose the Search for Page or Report icon, enter the SANDBOX ENVIRONMENT (CONTAINER), and then select the relevant link.
  3. Choose Host Locally.
  4. Save the CreateBCSandbox.ps1 file to your computer.
  5. Run Windows PowerShell ISE as an administrator.
  6. Open the CreateBCSandbox.ps1 file.
  7. Set the $containername = '' variable to the name that you want to give the container, for example.$containername = 'MyBizCentralApp'T his name is only used internally in your environment for identification purposes.
  8. Set the variable$accept_eula = '' to '$true'.
  9. Press F5 to run the script. The console pane displays the progress of a script. When the script has completed successfully, data like the following will display:…
    Container IP Address: 172.22.147.63
    Hostname: MyBizCentralApp
    Container DNS Name: MyBizCentralApp
    Web Client: http://MyBizCentralApp/NAV/
    Dev. Server: http://MyBizCentralApp
    Dev. ServerInstance: NAVFiles:
    http://MyBizCentralApp:8080/al-0.15.18566.vsixInitialization took 116 seconds
    Ready for connections!
    Reading CustomSettings.config from MyBizCentralApp
    Creating Desktop Shortcuts for MyBizCentralApp
  10. Write down or copy the following parameter/values from the console:Dev. ServerDev. ServerInstance, and Files.

You now have a container Business Central sandbox set up on your computer. The following shortcuts have been added to your desktop:

  • <Container name> Windows Client – opens the Windows client for your application in a container.
  • <Container name> Web Client – opens the Web client for your application in the container.
  • <Container name> CSIDE – opens the Dynamics Development Environment for developing your application using CSIDE.
  • <Container name> PowerShell Prompt – opens the Windows PowerShell prompt in the container.
  • <Container name>Command Prompt – opens the Windows command prompt in the container.

Set up Visual Studio Code

Visual Studio Code

Visual Studio Code

After the container Business Central sandbox is set up, you must set up Visual Studio Code for extension development. To do this, you need the values for,Dev. ServerDev. ServerInstance, and Files parameters that you retrieved from a Windows PowerShell ISE console when you ran the CreateBCSandbox.ps1 script.

  1. Open a browser to the path that is specified by the parameterFiles, and save the .vsix file to your computer.
  2. In Visual Studio Code, go to the Extensions, and then choose Install from VSIX. You now have the AL Language extension enabled.
  3. In Visual Studio Code, press Ctrl+Shift+P and then select AL Go!.
  4. Choose where to create the project, and then select the Your own server option.
  5. Open the generated launch.json file, update the "server" setting with the value of a Dev. Server parameter and the "serverInstance" setting with the value of a Dev. ServerInstance to reflect the container you just created. For example:   “server”: “http://MyBizCentralApp”,
    “serverInstance”: “NAV”,
  6. Save the launch.json file.

You have now set up the Visual Studio Code with the AL Language extension.

Share This Post

Leave a Reply

avatar
  Subscribe  
Notify of
Skip to toolbar