How to clean USR / ISV / VAR layer code

Hello everyone,

Got a new box that’s has code in the following layers and my idea to handle them. The main idea is to establish TFS to do version control. As TFS version control is layer specific, I want to focus on CUS layer only in future.

-1- USR layer — this is totally not desired, I want to generate a big XPO that includes all logic on this USR layer only, export it, and delete these elements when I log into USR layer, so that the USR layer is clean now.

-2- CUS layer ---- import the big XPO generated in USR layer to CUS layer, is this safe for tables? I heard the tableId could be re-allocated, and when push to production, the table ID is something new, the data could be lost. how does that happen? Does anyone know? It seems that certain table in model store database is keeping all tableId and field Ids there.

-3- VAR layer ---- I want to clean the VAR layer code and import that into CUS layer, so the TFS could control the versions. — Does this sound fine?

-4- ISV layer ---- I don’t want to touch this, what does the real word practice recommend, do we have a recommended way?

This is my initial plan, any advice is greatly appreciated.

Thank you,

As you have mentioned ISV layer, I am assuming you are using AX2012

Easy way to delete code of specific layer is to create a private project based on a layer.

Open AX in the specific layer; followed by opening the newly created project.

Delete the objects within the project permanently.

Yes, we are using AX 2012. So, delete the elements in that layer, I can definitely do that. But when we import the XPO into the CUS layer, does anything bad happen towards Tables? Seems AX keeps the tableId and field Ids for table and its fields.

Thank you,

AX 2012 uses co-called installation-specific IDs, therefore you generally don’t transfer IDs across environments (unless you copy the whole modelstore). Neither .xpo files nor models contain table IDs, therefore if you import your model to production, the production environment can’t even know what IDs you have in DEV. Please read Deploying Customizations Across Microsoft Dynamics AX 2012 Environments to learn how it works.

OK, very good article, I will read it and raise further questions, thank you, Martin!