Downgrade from AX 2012 to AX 2009

Hi

We have an application we sell which has gotten a big touch up in it’s AX 2012 version. Now a customer running AX 2009 wants this functionality. So we need to downgrade lots of XPOs to AX 2009. I guessed there would be an issue with this and I am searching for a resolution for the problem.

I try to import an XPO with a project containing various AOT elements. The project does not show in the list and I cannot “Compare” anything, although e.g… classes and Base enums do show.

Probably the XPO format is different and incompatible, but is there a way anyway :wink:

You can edit the .xpo directly (it’s just a text file) but it’s not a lot of fun. I did it for a small .xpo before and I was surprised how much effort it required. It would be worth to create a tool to deal with the most common issues (e.g. removing Origin property).

Or you can change the way how .xpo files are processed by the Import dialog - you’ll find it in SysImportElements class. It might help to compare versions of this class in AX2009 and AX2012.

Apparently it is only needed to add a small bit of code to the XPO file. I compared a really simple class an searched for differences. There where three.

AX 2009 has these that AX 2012 XPO does not have:

  1. Extends parameter, in CLASS #ClassName PROPERTIES

  2. RunOn, in CLASS #ClassName PROPERTIES

  3. Version: 3, next line after METHODS keyword

I added Version: 3 to the AX 2012 XPO and It worked, with classes at least.

The files look like this

Dynamics AX 2012 version 6.0.947.862

CLASS #ExportTest_DEL

PROPERTIES

Name #ExportTest_DEL

Origin #{064B5648-FA78-4221-BE34-C8DF9955FC99}

ENDPROPERTIES

METHODS

SOURCE #testMethod

#public int testMethod()

#{

if(i >= 0)

{

return -1;

}

return 1;

#}

ENDSOURCE

SOURCE #classDeclaration

#class ExportTest_DEL

#{

int i;

#}

ENDSOURCE

ENDMETHODS

ENDCLASS

***Element: END

Dynamics AX 2009 5.0.1000.52

Exportfile for AOT version 1.0 or later

Formatversion: 1

***Element: CLS

; Microsoft Dynamics AX Class: ExportTest_DEL unloaded

; --------------------------------------------------------------------------------

CLSVERSION 1

CLASS #ExportTest_DEL

PROPERTIES

Name #ExportTest_DEL

Extends #

RunOn #Called from

ENDPROPERTIES

METHODS

Version: 3

SOURCE #classDeclaration

#class ExportTest_DEL

#{

int i;

#}

ENDSOURCE

SOURCE #testMethod

#public int testMethod()

#{

if(i >= 0)

{

return -1;

}

return 1;

#}

ENDSOURCE

ENDMETHODS

ENDCLASS

***Element: END

Update, only works when not importing the whole class. Works with Compare and can manually import methods and bits of code. Do get an Error when importing the whole class. will take a look at what Martin Dráb said.

Projects can also be imported by removing the Origin property under the PROPERIES section.