O'Reilly logo

Extending Microsoft Dynamics NAV 2016 Cookbook by Alexander Drogin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using .NET assemblies in C/AL

As an introduction to .NET assemblies in C/AL, we will develop a function to export the contents of any table to an XML file. The Exchanging data with XMLPort objects recipe in Chapter 2, Advanced C/AL Development, covered a similar topic of XML export with the XMLPort objects. While XMLPorts win in terms of simplicity, .NET objects are victorious in flexibility. The development of an object based on .NET interoperability requires more effort, but the result is applicable to any table, while XMLPorts are bound to a fixed table.

How to do it...

The object developed in this recipe, allows us to select any table and export its contents into an XML file.

  1. First, create a page that will list all tables where the user can select ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required