[Ax 2012] Moving model from one layer to another (Step by Step guide)
Ax 2012 allows moving code within the same layer. MSDN has a topic Maintaining Installation-Specific Element IDs and Element Handles [AX 2012] which does describe the issue in a short description.
With Ax 2009 this is not a big issue as code can be exported as XPO’s with ID’s and moved into another layer. Ax 2012 creates ID’s which are installation specific, and doesn’t let importing or exporting XPO’s with Id.
This is my take on a step by step procedure to achieve this.
Step 1. Create a model and move all the objects that you want to move out of the layer.
Step 2. Create a project of this model and export the project as an xpo.
Step 3. Backup the database and delete the old model created in step 1
Step 4. Synchronize the database from the AOT. This will delete the data but we will retrieve it later.
Step 5. Import the xpo from step 2
Step 6. Synchronize the database.
Step 7. Export this new model.
Step 8. Restore the database that was backed up from step 3
Step 9. Import the new model (step 7), Synchronize and compile
This restores the I’d values of the objects and tables / fields. So no data will be lost
Step 10. Delete old model, compile / synchronize.
This should successfully move the code into the new layer and you won’t loose any data.
With Ax 2009 this is not a big issue as code can be exported as XPO’s with ID’s and moved into another layer. Ax 2012 creates ID’s which are installation specific, and doesn’t let importing or exporting XPO’s with Id.
This is my take on a step by step procedure to achieve this.
Step 1. Create a model and move all the objects that you want to move out of the layer.
Step 2. Create a project of this model and export the project as an xpo.
Step 3. Backup the database and delete the old model created in step 1
Step 4. Synchronize the database from the AOT. This will delete the data but we will retrieve it later.
Step 5. Import the xpo from step 2
Step 6. Synchronize the database.
Step 7. Export this new model.
Step 8. Restore the database that was backed up from step 3
Step 9. Import the new model (step 7), Synchronize and compile
This restores the I’d values of the objects and tables / fields. So no data will be lost
Step 10. Delete old model, compile / synchronize.
This should successfully move the code into the new layer and you won’t loose any data.
No comments:
Post a Comment