Wednesday, 13 June 2012

Wrong EDT on HcmEmployment

In Dynamics AX 2012, financial dimensions has been given a full makeover. As a results the tables which had fields with EDT Dimension has to be replaced with fields that have the new EDT DimensionDefaut. This can be observed by looking at fields like CustTable.DefaultDimension. However HcmEmployment.DefaultDimension refers to EDT RefRecId as shown below.


Although it works fine as DimensionDefault is derived from RefRecId, but if you try to use some of the classes like DimensionProvider, system will throw following error 

Unknown type: RefRecId

The method addDataSourceToQuery in the DimensionProvider class checks the field's EDT and throws error if it is not a proper EDT. This field in the HcmEmployment table needs to be changed to the right EDT  until a hotfix addresses the issue.


This posting is provided "AS IS" with no warranties. Use code at your own risk.

1 comment:

  1. That saved my day. This's what exactly I struggled in my first using of DimensionProvider class and I thought I was wrong with something. Thanks... :)

    ReplyDelete