Share via


COM Overview

This topic describes how you can use Component Object Model (COM) technologies in the Microsoft Dynamics NAV Development Environment to extend the functionality of Dynamics NAV. In the development environment, you can use two types of COM technologies: Automation and custom controls.

Only non-visual controls are supported. A control cannot be used to add graphical or user-interface elements to a Dynamics NAV object. For example, you cannot add a third-party control to a page. However, the control can display information and interact with the user in a window of its own.

Important

COM technologies are not supported by Microsoft Dynamics NAV Web client.

Automation

Automation is a client-server infrastructure that enables one application to access and communicate with another application. By using Automation, an application, such as Microsoft Office Word, exposes its internal functions and routines as Automation objects that Dynamics NAV can access through an Automation controller that is run on the Microsoft Dynamics NAV Windows client. The application that exposes the Automation object, such as Word, acts as the Automation server, and the Automation controller acts as the client.

Automation enables tasks that are typically run manually to be run automatically instead. For example, you can write a script to extract data from a database, put the data into a Microsoft Office Excel workbook, and then display the data graphically.

For examples of Automation in Microsoft Dynamics NAV 2018, see Walkthrough: Using Automation to Write a Letter in Microsoft Office Word and Walkthrough: Using Automation to Create a Graph in Microsoft Excel.

Custom Controls

Custom controls are OLE Control Extensions (OCX) or ActiveX controls, which are specific types of Automation objects. OCX and ActiveX controls are generally small programs or application objects that you can start from your Dynamics NAV application to perform a specific function or task. You can use custom controls for various types of tasks. By default, there are several custom controls available in Dynamics NAV from the Tools menu in the development environment. To develop custom controls, you can use tools such as Microsoft Visual C++ or Microsoft Visual Basic. Both products use wizards to make it easy to develop COM objects. You can also develop functional controls without understanding the complex details of COM.

If you will use existing custom controls from the development environment, then you do not have to know anything about COM. Using the functionality provided by a COM object is no different from using any C/AL function.

See Also

Extending Microsoft Dynamics NAV Using COM
Using COM Technologies in Microsoft Dynamics NAV
Best Practices for Using Automation with the Microsoft Dynamics NAV Windows Client