Custom code snippets in AX 7

I already explained how to use code snippets and a problem you might run into, but what if you want some additional snippets? The good news is that you can easily build new snippets by yourself. Let’s use a concrete example. Let’s say that you often write queries with the query framework and execute them …

Continue reading ‘Custom code snippets in AX 7’ »

Code snippets in AX 7 – The Problem

In the previous blog post, I demonstrated how to use several code snippets in Visual Studio. I also mentioned that there is a problem – here I’m going to look at it more closely. Let me introduce yet another snippet, just to make it a little bit more interesting. propfull is modeled on a snippet …

Continue reading ‘Code snippets in AX 7 – The Problem’ »

Code snippets in AX 7 – Introduction

Code snippets, in general, are small pieces of code that often can’t be used separately, but they’re rather intended to be integrated in a larger solution. Visual Studio offers several features for working with snippets, and because Dynamics AX development is now done completely in Visual Studio, X++ developers can use them too. Let’s start …

Continue reading ‘Code snippets in AX 7 – Introduction’ »

Connection to external database

You sometimes need to connect from Dynamics AX to another database and read or write data there. The usual approach uses OdbcConnection class, as described on MSDN in How to: Connect to an External Database from X++ Code [AX 2012]. Although it definitely is a possible solution (I used it already in AX 3.0), it …

Continue reading ‘Connection to external database’ »

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’ »