Reference group in table browser in AX 2012

Continue reading

Table browser is a widely used tool for viewing table data directly from Microsoft Dynamics AX development workspace. A simple, grid-based form presents selected records from a particular table.

List of columns consists of all visible non-system fields in alphabetical order as well as some of system fields in the end.

Although the key feature of Table browser has not changed in Microsoft Dynamics AX 2012, the nature of data has slightly evolved – the surrogate keys have been introduced. As a result, RefRecId-based fields can be seen in table browser quite often. Obviously, it is not a preferable way of exploring data for any team member. Fortunately, there is a chance to make the form more human-readable:

Table browser in Microsoft Dynamics AX 2012

All we need is to add a reference group just after surrogate key field is shown on the grid. We modify addField() method of SysTableBrowser class.

Modify addField() method of SysTableBrowser class

Changes are in:

Changes after modify AddField() method of SysTableBrowser class

When we deal with Int64-based DictField:

Int64-based DictField.

The reference group is read-only and labelled as “REF: field” to mark it is not a field from table:

Reference group as read-only.

In general, there can be more than one column added in reference group. It depends on AutoIdentification field group from related table. Let us look at DirPartyLocationRole table and surrogate key PartyLocation.

Close-up on DirPartyLocationRole table.
AutoIdentification() method that contains surrogate keys for Party and Location in DirPartyLocation table.

This example is even more interesting, because referenced AutoIdentification field group in DirPartyLocation table contains two surrogate keys – Party and Location. The described mechanism finally takes DirPartyTable.Name and LogisticsLocation.Description (both belong to AutoIdentification field group of proper table) as a content of reference group displayed on grid.

More articles
Explore our blog

What can we do for you?

We'd love to hear about your project. Our team will get back to you within two working days.

Thank you for inquiry, we’ve passed it to our sales department, our representative will reach you back in his earliest convenience.
Oops! Something went wrong while submitting the form.