What do we need to develop in Dynamics 365 Business Central?

In today’s blog, we are going to look at how to start developing a very simple Hello World extension in Business Central, for which we will create a short video in the coming weeks.

¿Qué necesitamos para desarrollar en Dynamics 365 Business Central?

Necessary tools to develop in Business Central

Once we have decided to develop our application or customization in Business Central, we need tools to do so.

El programming language of Business Central, as you already know, is AL.

Herramientas necesarias para desarrollar en Business Central

Development environment: VSCode

We will use VSCode as the development environment. We can download it for free from this link https://code.visualstudio.com

Entorno de desarrollo: VSCode

VSCode is a development platform for multiple languages, so once it is installed we will need a specific extension for the AL language (also free). That extension is called AL Language.

Installation of the AL Language extension

  1. Inside VSCode, go to Extensions.
  2. In the search bar, type AL Language.
  3. Select Microsoft’s AL Language and click Install.

Instalación de la extensión AL Language

Once selected, click Install.
Una vez seleccionada pulsar sobre Instalar.

With this, we already have the environment ready.
The next step is to have a test database.
In this blog, we will use online Sandbox environments. To do this, we need Business Central in the cloud.

 

Environments in Business Central

Types of environments in Business Central

When we acquire a Business Central license, we gain the right to use up to four environments. These environments function as independent instances (or installations) of Business Central. One of them is the production environment, and the other three are test environments, or more technically, Sandbox environments.
Tipos de entornos en Business Central

 

The production environment is the main one and will be where the company operates. It has higher performance.
The Sandbox environments are for testing and development.

Los entornos Sandbox, son para pruebas y desarrollo. Business Central

 

First extension in Business Central SaaS

Creating the first application in Business Central

Once we have everything set up, we can now create our “Hello World” in Business Central.
To do this, we are going to create our first application.

  1. We open VSCode and click on the menu View – Command Palette.
  2. In the command line, we type AL:Go!
    En la línea de comandos, escribimos AL:Go!
  3. We configure our first application by choosing the folder where we will store our App.

Configuramos nuestra primera aplicación eligiendo la carpeta donde guardaremos nuestra App

The next step is selecting the platform we are going to develop for:
Lo siguiente es la plataforma para la que vamos a desarrollar:

Once selected, it will create our file structure — which we will review in a later blog — and it will ask whether we want to develop for our own server or for the sandbox we created in the cloud.

In my case, I will use the cloud:

nos creará nuestra estructura de archivos que ya veremos en un blog posterior y nos preguntará si queremos desarrollar para tu propio servidor o para el sandbox que hemos creado en la nube

 

Connection to the Sandbox in Business Central

Downloading base objects

Once “Microsoft cloud sandbox” is selected, it attempts to connect to your Sandbox to download the base objects.

That is, the tables, pages, etc. corresponding to our standard Business Central.

To do this, it will ask us to copy a code, and a browser window will open:
Descarga de objetos base

 

Es decir, las tablas, páginas, etc... correspondientes a nuestro Business Central estándar.  Para ello nos pedirá que copiemos un código y se abrirá una ventana del navegador:

After that, it prompts you to sign in with your user account to open Business Central:
Posteriormente, te indica que te identifiques con el usuario para abrir Business Central:

Once you are signed in, it will tell you that you can now close the window, since VSCode will continue downloading the objects in the background.

Una vez identificado, te dirá que ya puedes cerrar la pantalla, puesto que VSCode irá descargando por detrás los objetos.

After automatically running a series of commands in the output window — which we will review soon — the message “All reference symbols have been downloaded” will appear. This means that the Business Central objects have been downloaded.

Esto significa que se han descargado los objetos de Business Central.

 

Developing the PageExtension in Business Central

VSCode itself will have created an initial PageExtension, which essentially extends or expands the Customer List page.

Desarrollo de la PageExtension en Business Central

And this is how it extends it, making a message — ‘App published: Hello world’ — appear when the Customer List page is opened. You can modify the content of the message as you prefer.

Compiling and running the application in Business Central

Now we are going to compile and run our new application.

  1. To do this, we press F5 or go to the Run menu → Start Debugging.

Compilación y ejecución de la aplicación en Business Central

  1. If everything has gone well, VSCode will have generated an App file and published it to your Sandbox.

Si todo ha ido bien, VSCode habrá generado un fichero App y lo publicará en vuestro Sandbox.

  1. The Customer List is the page that opens by default when you run from VSCode, so the first thing you will see is your message.

 

If you now go to another page in the menu and then return to Customers, you will see that the message appears again every time you open the Customer List.

We have now prepared our first App for Business Central.

What VSCode has actually done automatically is compile my code, generate the App file, and publish it to my Sandbox:
Realmente lo que ha hecho VSCode automáticamente es Compilar mi código, generar el fichero con la App y publicarla en mi Sandbox:

Conclusion

Well, if everything has gone well, you will have developed your first App for Business Central. In the next video, we will go through all these steps to complement this blog and review them in detail…
I hope this has been helpful.

 

Specialists in development for Dynamics 365 Business Central

ABD, especialistas en ERP Dynamics 365 Business Central en Andalucia

At ABD, we are specialists in Dynamics 365 Business Central. Our team of experts is ready to help you develop and optimize your ERP.

Whether you need specific customizations, advanced integrations, or simply guidance to get started, we are here to support you every step of the way.

Do you need help with your Business Central development?

Don’t hesitate to contact us to receive tailored advice and solutions. Visit our contact page at ABD and discover how we can help you achieve your business goals.

Table of Contents

Follow us on LinkedIn
Subscribe to the Newsletter




    Labels