Total Pageviews

Search This Blog

Wednesday, April 9, 2008

Debugging AX via .Net Business Connector

In this blog, I will take you through a step-by-step debugging approach using .Net Business Connector.
Note: The .Net code is extracted from a custom solution which we built to hear to MSMQ messages and then logon to AX and pass on the message to an AX API.
Launch Vision Connector Test Application (Start => Programs => Vision Connector => Vision Connector Test Application).
Note: Make sure message queues are set properly in Send queue and Receive queue.

Launch TestVisionConnector.sln (.Net Solution) using VS 2005. Insert a breakpoint by going
to the event VICO_NewMessageXML and press F9 key.

Press F5 key inorder to initiate the debugging process. Now, a window will open and the status of the title bar for the project will show Running.

Launch Microsoft Dynamics AX and Navigate to AOT/Classes/ VCMSMQMgt as shown below:
Tip: Press “Ctrl + D” key to launch AOT (Application Object Tree) in AX.

Open Class VCMSMQMgt and go to the method NewMessageXML and press F9 key to insert a breakpoint.

Launch Debugger in AX by going to Tools => Development tools => Debugger as shown below:

This should open a new Debugger Window as shown below:

Start the communication flow by sending a request from the test application i.e. by pressing the “Send Request to Queue” button shown below:

Automatically, the breakpoint will be hit in TestVisionConnector application. (.Net solution).

Step over the code line by line by clicking the F10 key till the execution reaches the following line:
axobj.Call("NewMessageXML", InXML.xml);

Now, press F11 key to step in to AX Debug environment.

The above steps completes one cycle of debugging through the entire communication chain between Vision connector test application to Dynamics AX routing via .Net code.


Anonymous said...

See Please Here

Anonymous said...

nice article. I would love to follow you on twitter.