Recently I was surprised by an error which I did never encounter before. A feature was working all the years I have worked with the Microsoft Dynamics AX product. Now when using the feature to show all fields from one record in a form, AX gave me an error. This post will tell you about the error and the solution.
I will start to tranquillize you that the error only exists in Microsoft Dynamics AX 2012 R2. Probably only when you are using Cumulative update 7. Also don’t worry as there is a hotfix available. First I will show you the error I encountered. From the form Voucher transactions I wanted to show all fields from the current record. When clicking the button I got the error: “Property Name has max length 40. An attempt to set it to a string having length 42 has been made.” This is not happening on all forms in AX 2012 R2.
During my investigation I found that the form name is build using the next pattern: ‘_ShowAllRecords_’ + the table name which is being shown. I also noticed a change was made in a syp-model belonging to Cumulative update 7. Initially only the table name was used. As the elements in AX do have a maximum length of 40 characters this was correct. Due to the additional length of 16 characters of the new prefix, only long table names have this error.
I tested the initial release of AX 2012 and AX 2012 R3, both did not have this problem. In the R3 version there is also the prefix, but the string length is truncated to maximum 40 characters. To be honest I had to start using the Issue search on Lifecycle services. When you search on some keywords you will find an issue with an available hotfix. Here is the link to the issue found on Issue search: https://fix.lcs.dynamics.com/Issue/Resolved?kb=2955610
The contents of this issue confirms there is only a fix available for AX 2012 R2. The description mentions that the solution for the R3 version is backported to solve this issue.
The form Voucher transactions contains multiple data sources. When you use the right mouse and click on an area where another table is used, you don’t get the issue. E.g. the table GeneralJournalEntry has a shorter table name.
That’s all for now. Till next time!