Wednesday, January 20, 2016

Export-Import XPO files

Among our AX mundane chores I would highlight the promotion process. Nevertheless, this changed drastically since AX 2012 started using models and model stores; sometimes, the old good way is in demand, yet.

I am talking about promoting your projects between environments via exporting and importing XPO files. First, we export the project from, say, DEV environment to an XPO file. Then we import it to TEST environment with the Definition only option checked. After that we export the current content of this project as a back up. Finally, we re-import the project entirely.

Schematically the process goes as follows:

TEST<-DEV\MyProject.xpo (definition)

Not a big deal when it comes to one-two projects only. Everything changes when you need to cope with a dozen of them... I developed a small class that keeps me lazy by doing all these steps.

You need to set up its parameters for every environment where you need to promote projects.

It reads project names to export-import line by line from a plain text file and processes them one by one.

Note: it works on CUS layer only and without labels; however, it can be easily adapted to your context.

Here is the link to download.

No comments: