Book Image

Dynamics 365 Business Central Development Quick Start Guide

By : Stefano Demiliani, Duilio Tacconi
Book Image

Dynamics 365 Business Central Development Quick Start Guide

By: Stefano Demiliani, Duilio Tacconi

Overview of this book

Microsoft Dynamics 365 Business Central is the new SaaS ERP proposition from Microsoft. This latest version has many exciting features guaranteed to make your life easier. This book is an ideal guide to Dynamics 365 Business Central and will help you get started with implementing and designing solutions for real-world scenarios. This book will take you through the fundamental topics for implementing solutions based on Dynamics 365 Business Central (on-premise and SaaS). We'll see the core topics of the new development model (based on extensions) and we'll see how to create applications with the new Microsoft ERP proposition. The book begins by explaining the basics of Dynamics 365 Business Central and the Microsoft ERP proposition. We will then cover topics such as extensions, the new modern development model of Visual studio code, sandboxes, Docker, and many others. By the end of the book, you will have learned how to debug and compile extensions and to deploy them to the cloud and on-premise.You will also have learned how to create serverless business processes for Microsoft Dynamics 365 Business Central.
Table of Contents (13 chapters)
Title Page
Packt Upsell
Contributors
Preface
Index

DotNet variables


In the on-premise Microsoft Dynamics NAV world, many integrations with external applications are performed by using DotNet add-ins. The use of DotNet variables in Microsoft Dynamics 365 Business Central in the cloud (SaaS version) is actually not supported.

You can use DotNet variables only if your extension targets the on-premises version of Microsoft Dynamics 365 Business Central. For this, you have to set "target": "Internal" in your app.json file in Visual Studio Code:

A .NET type in the AL language is declared in the following way:

dotnet
{
    assembly(ASSEMBLY_NAME)
    {
        type(DOTNET_TYPE; ALIAS){}
    }
}

In preceding code, we can see the following:

  • ASSEMBLY_NAME is the name of the assembly to reference
  • DOTNET_TYPE is the .NET type to reference in the selected assembly (fully qualified name)
  • ALIAS is an alias used to reference the .NET type from the AL code

When using DotNet from AL, you need to provide to Visual Studio Code, and to the AL compiler, the paths on...