Tips for CIL debugging: Collection classes

In some cases, you can make your debugging much easier if you debug CIL instead of the original X++ code. Working with collection classes (lists, maps, etc) is such a case. For example, the following picture shows a map (mapping customer IDs to CustTable records, e.g. for caching) as displayed by the AX debugger: If …

Continue reading ‘Tips for CIL debugging: Collection classes’ »

Tips for CIL debugging: No variables displayed

Because AX 2012 sometimes executes CIL generated from X++ instead of X++ itself, debugging must be done in a debugger that understands CIL and it almost always means Visual Studio. AX developers sometimes complain about the need of switching between two debuggers, that loading of symbols for debugging is slow and so on. Although these …

Continue reading ‘Tips for CIL debugging: No variables displayed’ »

Objects ignored by Code Upgrade Tool

When testing my new rule for code upgrade tool, I found that certain objects are skipped and rules are not checked for them. That makes the tool significantly less useful, because you can’t be sure that it found everything. This blog post explains why it happens, but unfortunately doesn’t provide any reasonable workaround, except making …

Continue reading ‘Objects ignored by Code Upgrade Tool’ »

Custom rules for Code Upgrade Tool

The Code Upgrade Tool allows you to detect patterns in X++ code and even to automatically change code. It’s especially useful for code upgrade, because you can easily upgrade legacy code. For example, CompanyInfo.CurrencyInfo field was replaced by CompanyInfo::standardCurrency() method in AX 2012. To upgrade your code, you would have to find and fix all …

Continue reading ‘Custom rules for Code Upgrade Tool’ »

Delete order line through AIF

The following code sample shows how to delete a line of an existing sales order through AIF from outside Dynamics AX 2012 . It uses a partial update, which means that we don’t have to send the whole document back to AX. As the documentation says, we have to include just the fields to change …

Continue reading ‘Delete order line through AIF’ »