Join first line in AX 2012

You sometimes need to join only one related record for each parent record, for example one order line for each order header. I’m always suspicious of such requirements, because it often means that users/analysts didn’t realize that there may be more than one record, or they didn’t think enough of identifying the one record they …

Continue reading ‘Join first line in AX 2012’ »

Permissions for Configuration Manager

When trying the new Configuration Manager for AX 2012, I got an error when exporting a stored configuration. The message in LCS said only that an unknown error occurred, which obviously wasn’t very helpful. Fortunately I checked the event log on my server with AX and immediately found the problem. There was a log entry …

Continue reading ‘Permissions for Configuration Manager’ »

Getting record from QueryRun in C#

This week I wrote some C# code using .NET Interop to X++ and I needed to get records from a QueryRun object. You surely know how to do it in AX (by calling QueryRun.get()), nevertheless I wanted to do it in a slightly better way. My method is rather short, but it may be difficult …

Continue reading ‘Getting record from QueryRun in C#’ »

The value 1 is not found in the map

We were getting the error, “The value 1 is not found in the map”, in one of our rather complex processes in AX 2012. It occurred only sometimes, which made debugging difficult, but finally I managed to track it down. The cause lies in something that many people use, therefore it’s possible that you will, …

Continue reading ‘The value 1 is not found in the map’ »

Connection string for LINQ to SQL

In my article about connecting to external databases with the help of LINQ to SQL, I already mentioned how to parametrize which database to use, because you’ll likely use different databases for development, test and live environments. I wrote: In real implementations, I usually store DB server and DB name in AX database, create a …

Continue reading ‘Connection string for LINQ to SQL’ »