Book Image

Microsoft Dynamics NAV Development Quick Start Guide

By : Alexander Drogin
Book Image

Microsoft Dynamics NAV Development Quick Start Guide

By: Alexander Drogin

Overview of this book

Microsoft Dynamics NAV is an enterprise resource planning (ERP) software suite for organizations. The system offers specialized functionality for manufacturing, distribution, government, retail, and other industries. This book gets you started with its integrated development environment for solving problems by customizing business processes. This book introduces the NAV development environment – C/SIDE. It gives an overview of the internal system language and the most essential development tools. The book will enable the reader to customize and extend NAV functionality with C/AL code, design a user interface through pages, create role centers, and build advanced reports in Microsoft Visual Studio. By the end of the book, you will have learned how to extend the NAV data model, how to write and debug custom code, and how to exchange data with external applications.
Table of Contents (10 chapters)

Codeunit variables – calling functions from other codeunits

In all code examples in this chapter, we created codeunits that contained functions used locally by codeunits themselves. But a codeunit is a code library that could contain common functionality available to other objects. The following section will show how to invoke functions from code libraries in C/AL:

LOCAL ExportPriceList(FileName : Text)
XMLDoc := XMLDoc.XmlDocument;
XMLDOMManagement.AddRootElement(XMLDoc,'PriceList',RootNode);
IF Item.FINDSET THEN
REPEAT
XMLDOMManagement.AddElement(RootNode,'Item',Item."No.",'',ItemNode);
XMLDOMManagement.AddAttribute(ItemNode,'Description',Item.Description);
XMLDOMManagement.AddAttribute(ItemNode,'Price',FORMAT(Item."Unit Price"));
UNTIL Item.NEXT...