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.
Not anything new but still a good post. How to debug different types of code in AX 2012. https://msdn.microsoft.com/en-us/library/gg860898.aspx
If you get a dialog saying the object is already checked out by another user you can mark that line and a button emerges to take over the object. However we have experienced a few times that the first user to check it out claims to have lost changes, while the new user takes control of the object.
There is another way to do it. Go to the DB and locate the table SYSVERSIONCONTROLMORPHXLOCKTABLE. It holds all the locks and you can simply replace the userId in the CREATEDBY column for the object which you wish to take over the control for.
Want to Update, Insert and Delete when comparing one table against another in just one go. Merge is what you are looking for. It is explained in steps here: http://www.made2mentor.com/2013/05/writing-t-sql-merge-statements-the-right-way/
Find it hard to know what type of join to use when writing code in SQL? This is the best page I have seen explaining it: https://www.codeproject.com/kb/database/visual_sql_joins.aspx