Friday, 22 June 2012

Index with included columns

Dynamics AX 2012 now supports included columns on the indexes. While this is a great feature, there is a bug when there are indexes in system which has any of the included columns. The bug causes these indexes to be recreated in a full database synchronization even if no change is made to them. If these indexes exist on one of the larger tables, system takes a lot of time just to do a synchronization . Luckily a hot fix has been issued and can be obtained from customer source/partner source.

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

Friday, 15 June 2012

Attaching Ax32Server.exe process to Visual Studio

Last week I needed to debug a batch job. In AX2012 all the batch jobs run in IL. To debug these jobs you need to use Visual Studio and attach the AOS process. When I tried to attach Ax32Serve.exe, the process was disabled in the window as show below

Attach to process window
This made me wonder what is stopping the process from being available to attach. After a little investigation I realized that we are using Debug Diagnostic tool to create the dumps in case the AOS crashes and one of the crash rules to monitor the AOS was active. After de-activating the rule the AOS process was available to be attached for debugging purpose. So apparently only one application can monitor a running process.


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

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.