Delete order line through AIF

The following code sample shows how to delete a line of an existing sales order through AIF from outside Dynamics AX 2012 . It uses a partial update, which means that we don’t have to send the whole document back to AX. As the documentation says, we have to include just the fields to change …

Continue reading ‘Delete order line through AIF’ »

Table inheritance roots

I’m preparing a talk about table inheritance in AX 2012 and I wanted to know how many hierarchies exist in standard AX. Therefore I looked for all tables with SupportsInheritance = Yes and Extends = “”. It’s more than I expected (collected in AX 2012 R3): AgreementHeader AgreementHeaderExt_RU AgreementHeaderHistory AgreementHeaderHistoryExt_RU AgreementLine AgreementLineHistory AifDocumentFilter AifEndpointActionValueMap AifPort …

Continue reading ‘Table inheritance roots’ »

XML DocType in X++

Let’s say that we want to use X++ to create an XML file with the following DocType definition: <!DOCTYPE MyType SYSTEM "http://www.validome.org/check/test.dtd"> AX has Xml* classes (e.g. XmlDocument) for such purpose, but let’s build it with .NET classes first (you’ll see why in a moment). This is X++ code calling .NET classes through .NET Interop: …

Continue reading ‘XML DocType in X++’ »

Operand types are not compatible

I managed to produce a really confusing error in AX 2012. Look at the following piece of code: MyExtendedDataType a, b; a = b; Pretty boring, isn’t it? There is nothing to fail… except that I got a compilation error: Operand types are not compatible with the operator. What? Actually it become quite clear as …

Continue reading ‘Operand types are not compatible’ »

Compile backwards

Today I noticed that Type hierarchy browser in AX 2012 R3 allows you to compile types backwards: Context menu in AOT supports only forward compilation. It’s possible that the feature is there for some time and it just took me long time to notice it, because I normally don’t compile code from Type hierarchy browser.