When to use Managed Code in Dynamics AX

 At a Dynamics AX conference in summer 2011, I was asked for guidance on when to use C# compiled to .NET Framework CIL, instead of traditional interpreted X++ compiled to p-code, in my Dynamics AX application. I will describe some deciding factors for you to consider. Some material presented herein is applies only to AX…

0

Missing values: getting the System.Missing.Value value

When dealing with office integration scenarios and when calling APIs that are based on old COM interfaces, there  is a need to specify that a value is not provided. The notmal way to do this (say, in C#) is to use System.Reflection.Missing.Value Now, as it happens, Value is not a static property, as one might expect,…

1

CLR interop: Passing Int16 values to managed code.

As you all know, Dynamics AX supports 32 bit integers in its int datatype. However, sometimes you need to transfer an int16 value to a managed method. Currently the easiest way to acheive this is by doing:static void Job2(Args _args) { System.Int16 short; int num = 2356; ; short = System.Convert::ToInt16(num); print short; pause; }…