‘View details’ button does not work on EDT fields used in forms displaying records from customized tables
Published On: December 10, 2018Categories: Technical
In previous versions of Microsoft Dynamics AX, table relationships could be defined in the Application object tree under the Relations node of either an EDT (Extended Data Type) node or a specific table node. Starting with Microsoft Dynamics AX 2012, the use of relations on EDT is obsolete and should be deleted in its future versions. All table relations defined under an EDT should be migrated since they should be defined on tables only. If this is not done correctly, the ‘View details’ option can be unavailable for EDT fields used in forms displaying records from customized tables. This problem might occur even though the ReferenceTable property on the EDT is set to some table and this EDT matches the type of the primary index from the corresponding reference table.
Our team came to the solution of this problem, which is explained in the text below:
Firstly, you need to create a self-relation in the table whose primary index matches the EDT.
Another option is to create a hidden menu item button, which opens the main form of the data from the table whose primary index matches the given EDT.
Next, on the grid displaying the records from this table set this button as a default action. ‘View button’ option will appear on right clicking the first field in the grid. It is important to note that this is not the best solution, since this works only on forms containing a grid with the corresponding table set as main data source. If you want to use this field from the same table in other forms, the ‘View details’ button won’t be shown again, unless the previously mentioned conditions are fulfilled. This approach is used in the Sales agreements list page.