Sunday, May 25, 2014

Move objects from one layer to another in AX 2012 by retaining object ids

Hi Folks,

In AX 2009, We had an option of importing the new objects with ids using xpo from one layer to another. However, In AX 2012, The object ids are installation specific and we do not have an option to import them with object ids and this may affect in losing the data. The work around steps to move objects from one layer to another and still retain the old objects is as below:

Step 1. Create a new model and create a CUS layer project in this new model.

Step 2. Move all the CUS layer objects into this new model and export the project as an xpo.

Step 3. Export the required languages ald files from the label files created in CUS layer by navigating to AOT-> “Label Files” -> Languages

Step 4. Stop AOS.

Step 5. Backup model and business data dbs.

Step 6. Uninstall all the models in CUS layer and then start the AOS.

Step 7. Synchronize the database from the AOT. This will delete the data but we will retrieve it later.

Step 8. Create a new model in VAR layer then import the xpo from the xpo backup taken in step 2.

Step 9. Import the ald files from Step 3 into  the new model by navigating to AOT-> “Label Files”.( Right-click on the Label file node and use option “Create from File).

Step 10. Stop AOS and export this new model.

Step 11. Restore the model and business data databases that was backed up in step 5.

Step 12. Import the new model from step 10,  Start the AOS and then Synchronize Data dictionary.
 This restores the Id’s of all the new objects. So no data will be lost.

Step 13. Stop AOS, Uninstall all the models in CUS layer and then start the AOS.

Step 14. Synchronize and compile the application.           


No comments: