Models Export and Import: Dynamics 365 for Finace and Operations

Posted by

Scenario:

Export model from one dev environment to another dev enviornment

Steps to perform:

  1. Export model from enviornment using command prompt
  2. Import Model in another enviornment using command prompt
  3. Resolve conflicts
  4. Complete build of models and Synchonization of Database

 

Export Model:

Export the model using utilily name ModelUtil.exe located in the below path

K:\AosService\PackagesLocalDirectory\Bin

K:\ Drive can be varrried for local VM C:\ or J:\ 

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]

 

Example:

ModelUtil.exe -export -metadatastorepath= K:\AosService\PackagesLocalDirectory -modelname=D365FnOModel -outputpath=C:\Users\Userf3d496631\Desktop\US\devmodelsbackup

Screen Shot 2019-09-08 at 4.47.49 PM

 

Import model:

To install or import a model file use below code

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

Example:

ModelUtil.exe -Import -metadatastorepath= K:\AosService\PackagesLocalDirectory -file=C:\Users\Userf3d46296631\Desktop\US\devmodelsbackup\D365FnOModel

Screen Shot 2019-09-08 at 4.59.11 PM.png

 

Delete a Model:

If model already exists in the destination environment. Delete the model using modelutility.exe

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

Example:

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

Screen Shot 2019-09-08 at 5.02.35 PM.png

 

Resolve the conflicts after importing:

 

Screen Shot 2019-09-08 at 5.04.05 PM.png

 

Build and sycnhronize:

after resolving all the conlicts build the model(all models would be better but it will take long time) and synchronize the database

 

Leave a Reply

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

WordPress.com Logo

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

Google photo

You are commenting using your Google 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

This site uses Akismet to reduce spam. Learn how your comment data is processed.