Welcome to my blog

To enlarge pictures click on picture

Sunday, November 27, 2011

How to integrate Visual Studio at Dynamics AX for newbie (with CLR Interoperability)

After we try to integrate DAX in VS (see how to integrate DAX at VS for newbie..) now we try to the contrarily which is VS integrated in DAX AOT using CLR Interoperability. The concept is same with .net business connector where before codes create we have to insert the reference/CLR assembly of external code/program to current environment of DAX. Some Microsoft partners need to hide they program logic/customization on DAX from user; with CLR interoperability they can do that. In this article only describe how to connect CLR assembly/library create in VS read on/ running on DAX, not too deep and the explanation made on simple example.

The scenario is the first to receive the message from C# which is parameter come from DAX and then shows the message on DAX, the second to create operation/calculation add on C# which is used on DAX.

The most important is how to create reference of CLR on DAX, in this example need to create 1 project class library in C# build and register in GAC or copied in the client\BIN then add reference on DAX to the dll/library we have made before, Please attention on using reference. Create 1 form, 2 buttons, 2 input text, 3 input integer and 4 static text on DAX. See following pictures and pay attention on RED and BLUE lines/rectangles.





















Have a nice day to try

How to integrate Dynamics AX at Visual Studio for newbie (with .net business connector)

This article describes how to connect DAX with VS in a simple example using MS .Net Business connector. I try to figure in VB.net and C#.Net just makes understand to the user in their expertise or skill, but better use C# than VB.Net on integration DAX with VS.

This example is how to show SalesID of the first record in the “salestable” table from table in Axapta although this can be easy in X++ coding at DAX. The most important is how to reference DAX at VS and coding of connection/login also dispose/logoff from connection. I not explain all about managed class in .net business connector the explanation should be getting in the help of visual studio or MSDN.

The following is the scenario: Try to make a form and a button to show the salesid. Add reference of DAX at VS and then import/using at project and then create sub/function to handle connection to DAX. Call that sub/function every we try to access DAX and don’t forget to logoff/dispose if we don’t need any more the connection. The following picture is the way how to make reference and connection of DAX at VS (example pictures made in VB.Net and C#). Please see the RED and the BLUE lines/rectangles.

VB.Net








C#





Have nice day to try