AX / D365FO – Import and Export ax models in Dynamics 365 for Finance and Operations

Export a Model

We ca use ModelUtil.exe, is a tool located in the path K:\AosService\PackagesLocalDirectory\Bin, where K drive could be different if you are not in a cloud environment.

Export the model store from the source environment

open a cmd with Administrative Privileges and navigate the path of ModelUtil.exe, now run this command:

ModelUtil.exe -export -metadatastorepath= [path of the metadata 
store] -modelname=[name of the model to export] -outputpath=[path 
of folder where model file should be saved]


ModelUtil.exe -export -metadatastorepath= K:\AosService\PackagesLocalDirectory -modelname=D365MyModel -outputpath=C:\Temp\MyModel.axmodel

Delete a Model

If you have already a previous version of the same model, is better delete it before import.

In order to delete a model run this command

ModelUtil.exe -delete -metadatastorepath=[path of the metadata store] -modelname=[name of the model to delete]

For Example

ModelUtil.exe -Delete -metadatastorepath= K:\AosService\PackagesLocalDirectory -modelName=MyModel

Import a Model

Import into the destination evironment

ModelUtil.exe -import -metadatastorepath=[path of the metadata store where model should be imported] -file=[full path of the file to import]

for example

ModelUtil.exe -Import -metadatastorepath= K:\AosService\PackagesLocalDirectory -file=C:\Temp\MyModel.axmodel

Refresh, Build and sycnhronize DB

Rrefresh the models to see your new imported model

Build the model with db syncronization

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s