Export (0) Print
Expand All

COM Business Connector Overview

NoteNote

COM Business Connector is no longer going to be supported in a future release. If you need to install COM Business Connector, you must install from the command line. For more information, see How to: Install COM Business Connector using Command-line Options. For information about .NET Business Connector, see .NET Business Connector Overview.


The Microsoft Dynamics AX Business Connector enables external applications to access Microsoft Dynamics AX data and invoke business logic. The Microsoft Dynamics AX major integration technologies include Business Connector. All these integration technologies interact with Microsoft Dynamics AX through Application Object Server (AOS). They are as follows:

  • Business Connector – Enables external applications written in C#, C++, and other programming languages to access data and call X++ methods in Microsoft Dynamics AX

  • Common Language Runtime (CLR) interoperability – Enables X++ methods in Microsoft Dynamics AX to call methods in external applications

  • Application Integration Framework (AIF) – Supports integration with Web services and other XML-based communication

Business Connector refers to the following similar technologies:

  • .NET Business Connector – Facilitates integration with external applications that are written in managed code and are built with the Microsoft .NET Framework

  • COM Business Connector – Utilizes COM to provide integration with external applications that are compiled to the COM specification

COM is a specification of how binary code, compiled from C++, for example, should be arranged. This arrangement allows components from different companies to interoperate. It allows function calls and communication streams between components to be properly processed. COM is a generic specification because it is independent of both the vendor language and the programming language.

COM specifies the IUnknown interface that all COM components must implement. The IUnknown::QueryInterface method informs the caller about all the particular interfaces that the component has implemented. For more information about COM, see Component Object Model.

Business Connector use depends on the following run-time environments:

  • Client

  • Server

  • Web

In a client run-time environment, Microsoft Dynamics AX and the external application can reside on the same computer. For example, you could develop an add-in for Microsoft Excel that connects to Microsoft Dynamics AX through the COM Business Connector.

A server run-time environment could have the .NET Business Connector installed on the same server computer that hosts AOS and the Microsoft Dynamics AX database. Microsoft Dynamics AX code could then make calls to .NET managed classes.

The Axapta and AxaptaRecord classes are among the Microsoft Dynamics AX classes that are often used in client and server scenarios. These two classes are kernel classes, and they are not in the Application Object Tree (AOT).

In Web run-time environments, the IISRequest and IISResponse classes are among the Microsoft Dynamics AX classes that are often used. These two classes are in the AOT in the System Documentation, Classes node.

The following C# code calls a Microsoft Dynamics AX static X++ method. The C# code is compiled into a command line executable program. It interacts with Microsoft Dynamics AX through the .NET Business Connector. The DemoBcnClass::AreStringsTheSameMethod method inputs two strings, and then returns true if the strings are identical.

using System;
using Bcn = Microsoft.Dynamics.BusinessConnectorNet;
class DemoCallXppFromCSharp
{
    public static void Main()
    {
        bool boolStringsSame;
        Bcn.Axapta axp;
        axp = new Bcn.Axapta();
        try
        {
            axp.Logon(null, null, null, null);
        }
        catch (Exception excepn)
        {
            Console.WriteLine(excepn.ToString());
            return;
        }
        boolStringsSame = axp.CallStaticClassMethod
            ("DemoBcnClass", // The class name.
            "AreStringsTheSameMethod", // The method being called.
            "H64", "L8"); // These two strings are not the same.
        Console.WriteLine(boolStringsSame);
        }
    }
}

Community Additions

ADD
Show:
© 2014 Microsoft