Error on ‘Show all fields’ in AX 2012 R2

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.

ShowAll1

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.

There is more

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!

2 replies
  1. wasimahmed
    wasimahmed says:

    if you show this to your developer , he will sort this out by changing the string size value in properties of that field

    Reply
    • André Arnaud de Calavon
      André Arnaud de Calavon says:

      Thanks for reading my blog and the comment. The developers should also be aware of LCS. It could be a lifesaver in many scenarios. I would rather let Microsoft fix an issue than having another customization in an AX environment.

      Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.