Thursday 26 June 2014

Understanding Layers in Microsoft Dynamics AX 2012



Microsoft Dynamics AX is fully customizable. Most of the code used by Dynamics AX is written in X++ and it is visible and editable in the AOT. This feature provides developers with the ability to add, remove, and even replace intrinsic Dynamics AX functionality within the system.

Some developers are more cautious than others, some are more detailed than others, and some of them spend more time and resources in testing new changes they made to the system. But after all, we are all humans and we can make mistakes. Having this amount of power, a developer could potentially make the system unusable.

Microsoft’s approach to this issue was to introduce the concept of layers. A layer is a hierarchical location where code resides. From left to right, these are the most common layers available in a standard Dynamics AX system:

SYS > GLS > FPK > SLN > ISV > VAR > CUS > USR

Each layer is completely independent of the other layers. You specify which layer to connect to when setting up the AX client profile.

The bottom layer will be the SYS layer and this is where the standard application code is located, and is only accessible by Microsoft. Other layers like ISV (Independent Software Vendor), VAR (Value Added Reseller) can be accessed by entering keys that Microsoft provides for each layer except USR (User) which does not require a key.

So the objective of the layers is to provide developers with the option to modify Microsoft’s code but only in one of the layers the developer has access to.

Every time a developer makes a change to a Dynamics AX object in the AOT, a copy (version) of the object is taken from a system layer to the layer which the developer is connected to. If there are multiple versions of the same object in different layers, then the top layer will take precedence and will be used.

Let’s use an example:

Standard Dynamics AX comes with a table named ALPHABET that consists of columns: A, B, and C. If there are no changes made in other layers then the end user will see the table exactly as in the SYS layer. 



If a developer logs on to Dynamics AX to the VAR layer and adds column D to the table, this is what happens.




Finally if a developer in the USR layer decides to remove columns B and C, this is how the table definition will be seen by the end user.



As you can see, the top layer will always be used, and in this case, it will not matter if you keep adding columns to the table definition in the VAR layer as those new columns won’t be available to the end user, as the USR layer takes precedence.

 Reference : http://www.erpsoftwareblog.com

Regards,
Sathish

No comments:

Post a Comment