Monday 9 April 2018

Model Import/Export/Delete in AX7


1.Open Command Prompt

find out \ AOsService\PackagesLocalDirectory of Directory path.
EX: Our package save in K directory

    ---->C:\Users\Admin1ce5ba39d8>
remove path and change Directory using Cd..,k:
C:\Users\Admin1ce5ba39d8>cd..
C:\Users>cd..
C:\>
change directory --->C:\>k:
K:\>

2. Add file path using cd path
ex:
   K:\>cd AOSService\PackagesLocalDirectory\Bin   enter<---

   K:\AosService\PackagesLocalDirectory\Bin>

3. Now take model export:
EXPORT  Model:
To export a model in a model file, use the ModelUtil.exe tool which is located in K:\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]

Example:
K:\AosService\PackagesLocalDirectory\Bin>ModelUtil.exe -export -metadatastorepath= "k:\AOSService\PackagesLocalDirectory" -modelname="XYZ" -outputpath="K:\ModelBackup".

4.Delete Model.
DELETE Model:
Delete Model
ModelUtil.exe -delete -metadatastorepath=[path of the metadata store] -modelname=[name of the model to delete]
Example:
K:\AosService\PackagesLocalDirectory\Bin>ModelUtil.exe -delete -metadatastorepath="K:\AOSService\PackagesLocalDirectory" -modelname="XYZ"
5.Now Import Model:
Import Model:
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]

Example:
K:\AosService\PackagesLocalDirectory\Bin>ModelUtil.exe -import -metadatastorepath="K:\AOSService\PackagesLocalDirectory" -file="K:\AXModel\XYZ.axmodel"


finally put full build and do full synchronize.






No comments:

Post a Comment