Book Image

Extending Microsoft Dynamics NAV 2016 Cookbook

By : Alexander Drogin
Book Image

Extending Microsoft Dynamics NAV 2016 Cookbook

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. Its integrated development environment enables customizations with minimal disruption to business processes. The book starts explaining the new features of Dynamics NAV along with how to create and modify a simple module. Moving on, you will learn the importance of thinking beyond the boundaries of C/AL development and the possibilities opened by with it. Next, you will get to know how COM can be used to extend the functionalities of Dynamics NAV. You’ll find out how to extend the Dynamics NAV 2016 version using .NET interoperability and will see the steps required to subscribe to .NET events in order to extend Dynamics NAV. Finally, you’ll see the cmdlets available to manage extension packages. By the end of the book, you will have the knowledge needed to become more efficient in selecting the extending methods, developing and deploying them to the Dynamics NAV, and practicing the best practices.
Table of Contents (17 chapters)
Extending Microsoft Dynamics NAV 2016 Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Using COM type libraries in C/AL


A COM type library is a binary file containing the definition of a COM component.

How to do it...

To illustrate the principles of working with OLE automation in NAV, we will create a simple codeunit that reads data from a NAV server configuration file that is stored in XML format.

  1. Create a codeunit object in C/SIDE object designer.

  2. All code will be placed in the OnRun trigger of the codeunit. Open local variables of the trigger and create a XMLDoc variable. In the DataType field, select the Automation option.

  3. Click the assist button in the Subtype field to open a list of automation objects registered in the system. At first, the list is blank. Click on the lookup button in the Automation Server field to see the list of available automation servers.

  4. Select Microsoft XML, v6.0 in the Automation Server List form:

  5. After you click OK and return to the previous form, the list of automation objects will show objects exported from the selected library. Select the DOMDocument60...