Wednesday, March 13, 2013

Ax 2012 Export / import Labels

Create a new notepad and add the below commands and save the file as with .bat extention to run as batch job.
cls 
del D:\Test\TstLabel.axmodel
cd /D D:\Program Files\Microsoft Dynamics AX\60\ManagementUtilities 
axutil export /model:"TST" /file:"D:\Test\TstLabel" /config:"Dynax_SIS" 
axutil import /file:"D:\Test\TstLabel" /config:"Dynax_SIS" /noPrompt 
Pause 

The 1st command clears the screen.
The 2nd command is used delete the file if the file already exists where we want to export the file.
The 3rd command will change the directory to where the Ax util tool is available. Check the path and ensure it is set to write file path.
The 4th command will export the model "tst" to the file path mentioned from the configuration file (AOS server). 
The 5th command will import the file to desired configuration (AOS server). Ensure the required model is available in the new AOS configuration. 
Also modal will be imported to the same layer as it was exported.
The 6th command will wait for user for user to press any key. This will help to check whether the export and import executed successfully.