Generic types in X++ (AX 7)

This blog post assumes that you’re familiar with generic types. If it’s not the case, I suggest you look at my previous blog post before continuing. You can’t create generic types and methods in X++, so why would you care about generics at all? The main reason is that it’s used heavily in .NET codebase …

Continue reading ‘Generic types in X++ (AX 7)’ »

Introduction to generics

My next blog post will cover a few topics regarding generics in AX 7 and because many X++ developers aren’t familiar with this concept (as it’s not used in X++ directly), I thought it would be to explain what it is. Imagine that you’re designing a collection class (such as a list) in a statically-typed …

Continue reading ‘Introduction to generics’ »

JSON-based custom service with parameters (AX 7)

Dynamics 365 for Operations deploys custom web services in two ways: as SOAP-based services and JSON-based services. AX developers are often familiar with SOAP services (which were used in AX 2012), but JSON-based ones are new to them. One particular challenge is passing arguments to a service. Let’s say we have an Add operation, which …

Continue reading ‘JSON-based custom service with parameters (AX 7)’ »

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