Dynamics AX – design and code

Archives

All posts for the month May, 2017

Say you have a table where you have two relations to the HCMWorker table because you want to log two persons for each records. Out of the box AX will give you an error because the relations causes a conflict. This is because they are given the same role names. To solve this you simply change the properties for the relations:

Set UseDefaultRoleNames to NO and then set names for the fields RelatedTableRole and Role. Now there will be no conflict …. unless you gave the two relations the same names in the fields that is :).

Ever wanted to be able to see records before committing them? I bet you have. It is not possible in Dynamics AX, but you can do it in SQL Server Management Studio. It is really easy as well.

Start Management Studio and connect to the SQL Server. Now navigate to Tools -> Options. From there, Query Execution -> SQL Server -> Advanced. There is a setting called SET TRANSACTION ISOLATION LEVEL. Set it to READ UNCOMMITED. Click OK button and you are done.

Just remember that unless you always want to see uncommited data, it is good to reset this setting once done.