Saturday, April 30, 2011

Exporting Labels with .XPO's in Dynamics AX 2009

     As an AX developer, I have learned that there is (almost always) at least two ways to accomplish any task inside the Microsoft Dynamics AX Environment. I have had the opportunity to work with several consultant developers   and I was (and still am) surprised by the fact that none of them knew the procedure for importing and exporting .XPO files with labels. Instead what they do is provide you with either an XPO (if you are lucky, most times they send a layer even if they only changed one object) and a label file. You must then take the AOS offline so that you can copy the label files over and then restart the AOS. This can be a real hassle, especially if you are receiving these updates several times a day (it is even more annoying when you find out that they gave you an older label file and some labels are missing).
     I found this so surprising (and aggravating) that I decided to do a little Google research and what I learned was that there is no Good information out there about how to perform this procedure. So I am taking it upon myself to make this information available. You're welcome Internet:
     I set up a new test project and I created a new report and a new menu item for that report. I created a new label (@HLY739) for it:
Next, you must export the project:
Then you need to make sure that you check the box that says"Export Labels":
For my purposes, I have unselected all the languages and only selected English (United States). If you or your company uses additional languages you should check those here.Then click OK and you should get the export completed message in the compiler output window:
If that is successful, then you are ready to import the XPO into another environment:
Make sure that you have selected the radio button for application objects and labels (you can also do just the application objects or just the labels). If you select the show details check box and then click on the Labels tab, you can see all of the labels in the project an can even manually select weather or not you would like to import the label. 
Then for the last step, you can check and make sure that the label was imported correctly:

As you can see, the label has been successfully added to the new environment with absolutely no down time!