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 SYS and bottom layer is USR. 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.

Monday, September 7, 2015

Which layer is best option for customization in AX 2012?

It is good for choosing the right layer.

For best customer development we can go ahead with VAR. For this we must have VAR code from Microsoft.

Layer
Description
USR
The user layer is for user modifications, such as reports.
CUS
The customer layer is for modifications that are specific to a company.
VAR
Value Added Resellers (VAR) can make modifications or new developments to the VAR layer as specified by the customers or as a strategy of creating an industry specific solution.
ISV
When an Independent Software Vendor (ISV) creates their own solution, their modifications are saved in the ISV layer.
SLN
The solution layer is used by distributors to implement vertical partner solutions.
FPK
The FPK layer is an application object patch layer reserved by Microsoft for future patching or other updates. For more information, see Patch Layers.
GLS
When the application is modified to match country or region specific legal demands, these modifications are saved in the GLS layer.
NoteNote
The GLS layer is consolidated into the SYS layer in Microsoft Dynamics AX 2012 R3.
SYS
The standard application is implemented at the lowest level, the SYS layer. The application objects in the standard application can never be deleted.