Creating sales orders via AIF in AX2012

I was asked for an example how to create a sales order through AIF document services (SalesSalesOrderService). Here is my minimalist variant in C# (for AX2012 and demo data): var line = new AxdEntity_SalesLine() { ItemId = "D0001", SalesQty = 42, SalesUnit = "ea" };   var order = new AxdEntity_SalesTable() { CustAccount = "US-003", …

Continue reading ‘Creating sales orders via AIF in AX2012’ »

AX2012 Windows 8 App Developer Starter Kit

Microsoft just launched an open-source project called Dynamics AX 2012 Windows 8 App Developer Starter Kit. As its name suggests, the project is about developing Windows 8 applications that communicate with Dynamics AX 2012. It currently contains one sample application and a guide describing its development. The sample application displays AX alerts for a given …

Continue reading ‘AX2012 Windows 8 App Developer Starter Kit’ »

ReceivedFault is not marked as serializable

Last week I needed to use a third-party web service in AX2009. I created a service reference in AOT, so AX generated necessary code and configuration and I was immediately able to get data from the service. Quickly done, almost without any work. Great. But I wouldn’t write about it if that was all. The …

Continue reading ‘ReceivedFault is not marked as serializable’ »

Serialization of enum types

Situation: A web service hosted on Dynamics AX 2012 AOS; it finds some data in database on demand and returns them. The type of one of the fields is UtilElementType enum. Problem: If no record is found, system throws the exception “Enum value ‘0’ is invalid for type ‘Dynamics.Ax.Application.UtilElementType’ and cannot be serialized.” Analysis: Fortunately, …

Continue reading ‘Serialization of enum types’ »

AX2012: Service Configuration Editor

The use of Windows Communication Foundation in Dynamics AX 2012 brings (among other things) a possibility to configure services by means of XML configuration files. An example of such configuration file can be Ax32Serv.exe.config (by default in C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\bin\) where you can set up parameters of system services hosted on AOS (including the …

Continue reading ‘AX2012: Service Configuration Editor’ »