D365 Finance and Operations
Model Import/Export in Dynamics 365 Operations
In this blog article, we will see how we can export model in a model file, then import model file in development environment and delete existing model in development environment.
- D3fO Environments.
- Export Model in a Model File.
- Import Model File.
- Resolve Conflicts.
- Build and Synchronize Model.
To export a model in a model file, use the ModelUtil.exe tool which is located in j:\AOSService\PackagesLocalDirectory\Bin and the -export directive.
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]
To install a model file in development Environment, use the ModelUtil.exe tool and the -import directive.
ModelUtil.exe -import -metadatastorepath=[path of the metadata store where model should be imported] -file=[full path of the file to import]
If the model already exists in Development Environment, then first delete the model using ModelUtil.exe tool and -delete directive.
ModelUtil.exe -delete -metadatastorepath=[path of the metadata store] -modelname=[name of the model to delete]
If the model you installed has customizations in higher layer, you need to resolve code or metadata conflicts.
Under Dynamics 365 -> Addins -> select Create Project from Conflicts.
- In dialog box, select the model you installed, to check for conflicts.
- Click Create Project.
- New Project is created with elements having conflicts. Resolve the conflicts.
Build and Synchronize
Build the Model and Synchronize the Database.