T4 templates

Text Template Transformation Toolkit, or T4, is a .NET technology for generating various text files, including source code files. It allows you to mix plain text and processing instructions (in a similar way like PHP, among others) and these processing instructions can contain usual C# or VB code. One example of its usage is the …

Continue reading ‘T4 templates’ »

AX2012 editor extensions

Assume that you would like to extend the editor in Dynamics AX 2012, for example by adding the (painfully missing) brace matching. How to do that? You must realize that although the editor looks almost the same as in previous versions, its architecture was completely changed. Now the Visual Studio editor is hosted in AX and …

Continue reading ‘AX2012 editor extensions’ »

First steps with AX2012 Management Shell

Dynamics AX 2012 allows to perform and automate many administrative tasks by PowerShell. But how we can use each of such PowerShell commands (cmdlets)? I’m not going to describe that – instead I want to show how you can find it out by yourself. PowerShell console for Dynamics AX can be run on a computer …

Continue reading ‘First steps with AX2012 Management Shell’ »

SurrogateKey on imported tables

If a new table is created in Dynamics AX 2012, its primary and cluster indexes are automatically set to “SurrogateKey” value. But if you import a table from an older version, SurrogateKey is not available and I’ve found no “normal” way how to achieve this. Nevertheless… in the .xpo of the newly created table: TABLE …

Continue reading ‘SurrogateKey on imported tables’ »

Binary data in AX2012

For a manipulation with binary data (e.g. binary files including images, serialized objects etc.), AX particularly offers classes BinData, BinaryIo and Binary. While the first two ones are the same in AX2012 as in AX2009, Binary got a few new useful methods: public static Binary constructFromContainer(container _data) public static Binary constructFromMemoryStream(CLRObject _memoryStream) public container getContainer() …

Continue reading ‘Binary data in AX2012’ »