Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Dynamics 365 Business Central Development Quick Start Guide

You're reading from   Dynamics 365 Business Central Development Quick Start Guide Modern development techniques for Dynamics 365 Business Central

Arrow left icon
Product type Paperback
Published in Aug 2018
Publisher Packt
ISBN-13 9781789347463
Length 224 pages
Edition 1st Edition
Concepts
Arrow right icon
Authors (2):
Arrow left icon
Stefano Demiliani Stefano Demiliani
Author Profile Icon Stefano Demiliani
Stefano Demiliani
Duilio Tacconi Duilio Tacconi
Author Profile Icon Duilio Tacconi
Duilio Tacconi
Arrow right icon
View More author details
Toc

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...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime