Index for delete actions

When using delete actions in Dynamics AX, don’t forget that AX will have to look into database to know if there is any related record. And if there is no index, the performance can be really bad. I’ve just run into such a case, when deleting a customer executed a query running for six seconds. …

Continue reading ‘Index for delete actions’ »

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