Today I will discuss two methods of customizing new Dynamics AX source code of model elements which are: over layering and extensions.
A new way of customization has been introduced by Microsoft by using extensions. An Extension is a brand new AX object that references an existing object. This style of development allows existing objects to be customized without directly touching the original object. It is a useful concept for future application updates as upgrades will become much simpler by reducing the number of dependencies.
Taking example from my recent scenario, where I have to add my Recruitment and leavers reports menu items into HRM module in order to be accessible for end users. Now see how things are working differently here that Instead of directly touching the existing menu, a new object is created that references the existing HRM menu. The AX compiler magically merger both HRM and HRM extended with newly added menu items.
What is great about this approach is that there is distinct ownership of each object. Microsoft owns the HRM Menu, while an ISV, Partner, or Customer owns the HRM extended menu. Each party can make changes to their object without impacting the other.
Menus are one area for extensions, but there are quite a few objects types eligible for extension.
- Data entities
- Some Enums
- X++ Code (Events)
We are hoping to see more in future from Microsoft as they continues to evolve the extension story and support more scenarios.
Another way of doing customization in source code and metadata model elements that are shipped by Microsoft or third-party partners in Microsoft Dynamics AX, the developer must create a new model that overlays the model they want to customize. For example, solution developers can provide code in the SLN layer, independent software vendors can use the ISV layer, and value-added resellers can use the VAR layer. Functionality defined in higher layers (VAR layer in this example) can override the functionality of lower layers.
The overlaying model must belong to the same Package as the source model and must belong to a layer that is higher than the source model. Over layering is a powerful tool to perform advanced customizations of metadata and source code, but may increase the cost of upgrading a Dynamics AX solution to a new version.
You can create a new model by going in visual studio -> Microsoft Dynamics – > Model management – > create new model
The below picture will help in understand both:
That’s it for now, I will cover more in depth including Packages. Extensions. Layers. Models in future blogs.
Happy Daxing 🙂