X++ to CIL: Object must implement IConvertible

Somebody asked in Dynamics User Group forum about an error thrown by RetailCommonWebAPI running in a batch in AX 2012 (RetailCommonWebAPI in batch mode). I don’t want to discuss that particular problem here, but I want to show the underlying cause, because it’s actually quite tricky. What I’m discussing below is related to CIL generated …

Continue reading ‘X++ to CIL: Object must implement IConvertible’ »

Summarized values in AX form

Users sometimes want to see both individual transactions in a grid of a Dynamics AX form, and some summarized values, such as the total amount or the number of lines (often above or below the grid). Iterating through the whole datasource and getting values one by one isn’t efficient, especially if the query returns many …

Continue reading ‘Summarized values in AX form’ »

Refreshing form parts

When using form parts in AX 2012, you sometimes need to explicitly refresh their data based on an event in the main form. It may not be completely obvious how to do it, but it’s not too complicated in the end. Form parts are actually forms by themselves and if you know how to manipulate …

Continue reading ‘Refreshing form parts’ »

Configuration of LCS System Diagnostics

System Diagnostics from Dynamics Lifecycle Services is a really handy tool – it collects data about your Dynamics AX environments and warns you if your setup is not optimal from performance perspective, if a number sequence is running out of available numbers, if batches are failing and so on. It allows you to act proactively, …

Continue reading ‘Configuration of LCS System Diagnostics’ »

Unit testing in AX – Basics

In the previous post, I talked about what unit testing is and how such tests should be designed. Let’s jump straight into X++ code this time. Unit tests are methods and we need a class to hold them. Such a container of test methods is called a test case and it’s simply a class extending …

Continue reading ‘Unit testing in AX – Basics’ »