Saturday, September 26, 2015

Models, Layers and Model store

AX 2012 database structure:

AX 2012 is having two databases. One for data another one for model store. You can find which data db is mapped with AX instance by using AX 2012 server configuration application. The model store name mostly named with data db name + “_model”. For example: your data db name is MicrosoftDynamicsAX2012 then your model store db name should be like MicrosoftDynamicsAX2012_model.

AX 2012 data database

Business data are stored on the data database the named like “MicrosoftDynamicsAX2012” based on your installation. For example, the data is customers, vendors, sales order, purchase order and so on

Models

Models are working based on single layer. We can create multiple models on the single layer. We are doing customization on the models. So, our customizations are stored on the model store. We shouldn’t use single element in multiple models and that models are in a single layer. It will create id conflict issue.

Layers

AX 2012 is having default application layers SYS, GLS, FPK, SLN, ISV, VAR, CUS and USR. layers are used to manage elements (for example: table, class, forms). The top layer is USR and bottom layer is SYS. If you do the customization on the VAR layer, that customization will affect in the VAR, CUS and USR layers.
For example, you add one table named table1 with two fields name and class in the VAR layer. You are removing the class field from the table table1 in the USR layer.
VAR, CUS layer having table table1 and two table fields named name and class. But, USR layer is having table1 table but only one table fields named name.
Each layer has a corresponding patch layer that can be used to incorporate updates to your application or to store conflicts when you import models into a layer. For more information about patch layers, see Patch Layers https://msdn.microsoft.com/en-us/library/aa891248.aspx.

Based on your license and configuration you can do your customization on the particular layer. To do your customization on the particular layer, you can find your license code on the customer source website or you can get from your Microsoft Dynamics partner. You can change the layer by using AX 2012 configuration application.

Model store

All models (For example: cus Model, var Model, usr Model and so on) are stored on the model store database.

As per the AX database structure, you came to know that data db tables and model store db data having relations. If you create new table on the SQL directly instead of on AX development environment, you will face some synchronization issue. You may not access that table in the AX workspace. Your newly created table won’t be created when you do model move or model store move. It is not a best practice.

1 comment :

  1. Top layer is USR layer and bottom layer is SYS. correct your blog

    ReplyDelete