Monday, June 20, 2011

Microsoft Dynamics AX 2012 - Type Hierarchy

With the upcoming release of Microsoft Dynamics AX 2012, one of the rather interesting new elements about this release, is the introduction of table type hierarchies.

When you glance at this, just from a data layer level, it seems to be super normalization. That is actually correct, however, you must look at the total picture. That means, you must take and look at this from the data + application layers, together.

That is the only way, that this concept then actually works. In order to help understand this concept, and how the new data structures live within Microsoft Dynamics AX 2012, there is a new tool called the Type hierarchy browser.

You can get to this tool, from any object within AX actually. Classes, tables, etc. For this post, we will focus on tables, and how the tool can help us better understand the data structure.

Lets pick a new structure in Microsoft Dynamics AX 2012, EcoResProduct. This is part of the new Master Data Management (MDM) / Product Data Management (PDM), that will exists out of the box for this release of AX.

Once we have selected the EcoResProduct table, within the AOT, simply right click, add-ins, and then click on the 'Type hierarchy browser' menu item.

Once we do this, we then see the hierarchy that exists for the EcoResProduct table, which extends from the Common table object.

You will notice, that both Common and the EcoResProduct tables have RecId, revVersions & relationType. You will also notice that, DataAreaId is no longer listed. We will save that for another post.

In here we can see as well that the EcoResProduct table inherits methods, from the Common table object. Fields that exists at the EcoResProduct table, are marked with blue blocks, that exist beyond the Common table. We can also see that, in the tree view on the right hand side of the screen, that the hierarchy make up, that EcoResProduct is a part of.

Extending from the EcoResProduct table object, is the EcoResDistinctProduct, and the EcoResProductMaster. Extending from the EcoResDistinctProduct, is the EcoResDistinctProductVariant table object.

Now, if we step forward in the tree, and select the EcoResDistinctProduct, in the tree view, we should see something that looks like the following.

Now you will notice, that for the EcoResDistinctProduct table, the only fields it has, is the three system fields that we listed above. If you look at the data for this table, sure enough that's all that is there, from the data layer perspective.

What this suggests then, and shows, is that the actual field data that lives for a Distinct Product, vs. a Product, still lives within the EcoResProduct table. The EcoResDistinctProduct table inherits the fields for:SearchName, ProductType, InstanceRelationType, and DisplayProductNumber.

When the table is referenced within a form, or code, the EcoResDistinctProduct table has these fields as possible uses, becomes of the new way AX handles, allowing table structure hierarchy.

This does a lot of things for such structures, it cuts down, big time, on the amount of repeat data, size of databases, and enables the application layer, to be the only true way, of working with the data that lives within a Microsoft Dynamics AX 2012 instance.

With using the Type hierarchy browser, provided out-of-the-box for Microsoft Dynamics AX 2012, one can better understand the new data structures, and be able to connect all the new dots, that will exists with this release.

This is very powerful, and through the use of the application layer, the statement of Powerfully Simple, which is the tag term being used to describe Microsoft Dynamics AX 2012, is true!

Source :