Other Interfaces

Some NAV systems must communicate with other software or even with hardware. Sometimes that communication is Inside-Out (that is, initiated by NAV), and sometimes it is Outside-In (that is, initiated by the outside connection). It's not unusual for system‑to‑system communications to be a two-way street, a meeting of peers. To supply, receive, or exchange information with other systems (hardware or software), we need at least a basic understanding of the interface tools that are part of NAV.

Note

Because of NAV's unique data structures and the critical business logic embedded therein, it is very risky for an external system to access NAV data directly via SQL Server without using C/AL based routines as an intermediary.

NAV has a number of methods of interfacing with the world outside its database. We will review those very briefly here. To learn more about these, we should begin by reviewing the applicable material in the online Developer and IT Pro Help material plus any documentation available with the software distribution. We should also study sample code, especially that in the standard system as represented by the Cronus Demonstration Database. And, of course, we should take advantage of any other resources available including the NAV-oriented Internet forums and blogs.

Automation Controller

One option for NAV interfacing is by connection to COM Automation servers. A key group of Automation servers are the Microsoft Office products. Automation components can be instantiated, accessed, and manipulated from within NAV objects using the C/AL code. Data can be transferred back and forth between the NAV database and COM Automation components.

Only non-visual controls are supported via this interface (that doesn't mean we couldn't figure out a work-around, just that they aren't supported by Microsoft). The Client Add-in feature, discussed later in this chapter, provides visual interface capability through another integration approach.

We cannot use an Automation Controller defined COM component as a control on a NAV Page object. Only client side automation objects are supported. This is because the NAV server tier operates in 64-bit mode and many COM objects are not compatible with 64-bit operating systems. Instead of server side automation objects, use Microsoft .NET interoperability functionality (for more information, search Help on interoperability).

Some common uses of Automation Controller interfaces are to:

  • Populate Word template documents to create more attractive communications with customers, vendors, and prospects (for example, past due notices, purchase orders, promotional letters, and so on)
  • Move data to Excel spreadsheets for manipulation (for example, last year's sales data to create this year's projections)
  • Move data to and from Excel spreadsheets for manipulation (for example, last year's financial results out and next year's budgets back in)
  • Use Excel's graphing capabilities to enhance management reports
  • Access to and use of ActiveX Data Objects (ADO) Library objects to support access to and from external databases and their associated systems

It will also be helpful to review the information on this topic in the following Help sections:

  • COM Overview
  • Best Practices for Using Automation With the Microsoft Dynamics NAV Windows Client
  • Automation Data Type
  • Using COM Technologies in Microsoft Dynamics NAV

Linked Data Sources

The two table properties, LinkedObject and LinkedInTransaction, are available for NAV tables. Use of these properties in the prescribed fashion allows data access, including views, in linked server data sources such as Excel, Access, other instances of SQL Server, and even an Oracle database. For additional information, see the Help sections Using Linked Objects and Accessing Objects in Other Databases or on Linked Servers. This is one way to integrate NAV with external applications in a way that is seamless for the users.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.33.157