Book Image

Mastering Microsoft Dynamics 365 Business Central

By : Stefano Demiliani, Duilio Tacconi
Book Image

Mastering Microsoft Dynamics 365 Business Central

By: Stefano Demiliani, Duilio Tacconi

Overview of this book

Dynamics 365 Business Central is an all-in-one business management solution, which is easy to adopt and helps you make smarter business decisions. This book is a comprehensive guide to developing solutions with Microsoft ERP (in the cloud and also on-premises). It covers all aspects of developing extensions, right from preparing a sandbox environment to deploying a complete solution. The book starts by introducing you to the Dynamics 365 Business Central platform and the new Modern Development Environment. You'll then explore the sandbox concept, and see how to create sandboxes for development. As you advance, you’ll be able to build a complete advanced solution for Dynamics 365 Business Central with AL language and Visual Studio Code. You'll then learn how to debug and deploy the extension and write automatic testing. The book will also take you through advanced topics like integration (with Azure Functions, web services, and APIs), DevOps and CI/CD techniques, and machine learning. You'll discover how Dynamics 365 Business Central can be used with Office 365 apps. Finally, you'll analyze different ways to move existing solutions to the new development model based on extensions. By the end of this book, you'll be able to develop highly customized solutions that meet the requirements of modern businesses using Dynamics 365 Business Central.
Table of Contents (25 chapters)
Free Chapter
1
Section 1: Dynamics 365 Business Central - Platform Overview and the Basics of Modern Development
5
Section 2: Developing Extensions for Dynamics 365 Business Central
10
Section 3: Debugging, Testing, and Release Management (DevOps)
15
Section 4: Advanced Integrations with Dynamics 365 Business Central
20
Section 5: Moving Solutions to the New Extension Model

Handling XML and JSON files with the AL language

The AL language extension has native support for handling XML and JSON documents.

An XML document is represented by using the XmlDocument data type, as explained at https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/xmldocument/xmldocument-data-type.

The following code shows how you can import an XML file and load it into an XmlDocument object:

local procedure ImportXML()
var
TempBlob : Codeunit "Temp Blob";
TargetXmlDoc : XmlDocument;
XmlDec : XmlDeclaration;
Instr: InStream;
filename: Text;
begin
// Create the Xml Document
TargetXmlDoc := XmlDocument.Create;
xmlDec := xmlDeclaration.Create('1.0','UTF-8','');
TargetXmlDoc.SetDeclaration(xmlDec);

// Create an Instream...