Viser indlæg fra 2015

Auto Create Classes

I think we all have this little archive of code that we use again and again in AX.

So i have made to different tools for handling these code snippets, and here is the first one of them, the Auto Create Class tool.

So really simply told when you run the Class, you select witch Class type to generate, then the name and/or further parameters for the Class you are making.

At the moment the Class can create these Class Types:

Std_Run,  Simple class with Main and Run methods.Std_DialogBatch,  Class that can run in Batch and has a DialogStd_Exp2Excel,  Class for exporting data to Excel, typically a Table, but could be anything.
But i hope to add on to this list as more stuff comes up, if you have any ideas write a comment with it, and i will have a look.

If you want to use this tool you can download a zip file with the tool from the links below.
The Zip file contains,
1 project export file with the elements needed in AX (PrivateProject_DevCreateClasses.xpo)3 xpo's with exports of the temp…

Windows Service that accesses Dynamics AX

So i saw this question from Eitan Mizrahi on the Microsoft Dynamics AX Community ( link )
And thought i would make an attempt to make an Windows Service that calls Dynamics AX and gets some data back from it.

For now the code is really simple, just the bare minimum, connect to Dynamics AX, call a class and receive the result in a string.

But its a good starting point, so any thing can really be build on top of it.

Download Visual Studio 2010 code ( link )

Three things you have to remember in Visual Studio, i have done it in the project but you might need to check on the reference.

Add a reference to Microsoft.Dynamics.AX.ManagedInterop.dll file, its usually found in the sub of your Dynamics AX installation under \BusinessConnector\Bin\Change the Target Framework to .Net Framework 2.0Change the Platform Target to x64 (So this code will only work on a 64bit machine)
As a help to make this i used the code Eitan Mizrahi put in the question on the forum, and this Youtube video on making a W…

The Code Profiler in Dynamics AX

The Code Profiler in Dynamics AX is a powerful tool for finding performance issues in the application.

But it can also be a little difficult to use simply just because of the overwhelming amount of data it creates, so sometimes it's nice to limit the amount of code it runs on.

This is where the macro #profileBegin comes in really handy.

If you already know the place in your code that runs slow, you can put in the macro before and after, and then the profiler only runs on that piece of code.

public void  printJournal(Set _journalList) {     /*      . Cut out code      .      .     */         {             #profileBegin("printJournal")    // RSH Start profiling code             this.sendAsXML();             this.doPrint();             #profileEnd                      // RSH End profiling code         }     } }
Now you only profile the code you actually …

Beta versions of Dynamics AX

So one of my thoughts when Microsoft bought the company Navision, and with that company the product we today knows as Dynamics AX, was YES now we will finally get beta versions of the product just like the Visual Studio developers of the world gets beta versions of that product.

But unfortunately that did not happen, we as developers only get access to the product when its ready to be sold.

And i do not understand why this is the case, is there any good reason why Microsoft is not letting us get early access to beta version of AX?

Please let me know what your thoughts are?