Yes, it’s 2025 and I’m still writing X++ code for Dynamics AX 2012. Sometimes, there are hurdles when you have to write code in an almost dead language for an almost dead product, and you’re trying to get information from the internet. I thought I would take a quick break and write a blog post about that.
First, the state of internet search, in general, is kind of rotten right now. That’s well-documented. And when you’re searching for information about an almost-dead product, it gets harder.
In terms of search engines: at work, I can generally use Bing, Google, and DuckDuckGo. None of those is blocked, though I can only log in to a Microsoft account, not a Google account. So whatever advantage there is to having your search history saved, I can only get that with Bing.
(At home, I’ve been experimenting with Kagi. That’s blocked at work, so I can’t use it there. I may be writing up a blog post on Kagi soon, but that’s for another day.)
I haven’t seen any advantage to using one search engine over another when searching for Dynamics AX content. I think Google is probably the best, to be honest.
A few general observations:
-
- Microsoft documentation for AX and X++ is usually still out there, somewhere, on Microsoft’s site, but it doesn’t always surface near the top of any given search. A good starting point for that might be here.
- AX lives on as “Dynamics 365 Finance and Operations”, or… something like that. Some of the documentation for FinOps also applies to AX 2012. A good starting point for that is here.
- Axaptapedia used to be a good resource for AX info, but it seems to be gone. It does occasionally still show up in search results. You may be able to find it on archive.org. (Though that’s another thing that’s blocked at work. Sigh.)
- There are a lot of AX-related blogs out there. Most of them are dead at this point, but still up on the web. And many of them were never really much good. Some were just cash grabs, scraping info from other blogs and sticking Google ads on them and hoping to make some money (presumably). Some were well-intentioned, but provided questionable advice. You can still find some useful blog posts out there, but you need to sift through some dross to get to the useful stuff.
Aside from using search engines, you can also try to get useful information about AX and X++ from LLMs, like ChatGPT and Copilot. I’ve had some success with that, but I’ve found that LLMs are prone to a lot of hallucination when it comes to X++ code. (Again, there are limits to the LLMs I’m allowed to use at work. I’m basically limited to Copilot and our internal LLM chatbot.)
I’ve recently been working on a problem, trying to optimize some fairly complex X++ code. I got some fairly useful advice and assistance out of our chatbot, but also some entirely wrong information. For instance, I needed to review some stuff about X++ collection classes. Our LLM hallucinated a few functions which would be great, if they existed, but they don’t. One was “Global::conSort()” which was supposed to sort a container, and “Set::toContainer()” which was supposed to convert a set to a container. Alas, neither of those exists!
It also gave me some incorrect information about sets. It told me that using a SetEnumerator does not necessarily guarantee that the set will be returned in a sorted, or even predictable, order. But I’m pretty sure that it does always return the set in sorted order. I haven’t found a definitive answer for that anywhere, but here’s a blog post that indicates that sets are returned sorted. And Axaptapedia seems to agree. (And all my testing supports that.)
And here’s one more blog post that has what I think is a pretty good answer:
No matter what order elements are added to a set or keys are added to a map, when using an enumerator to traverse the set or map, the elements are in a sorted order (for string and numeric types). However, the MSDN documentation for the set class states that elements are stored in a set “in a way that facilitates efficient lookup of the elements.” It might not be safe, therefore, to rely on this sorting behavior as it might possibly change in the future.
Good enough for me, for now. So maybe the LLM wasn’t entirely wrong on this, but for my purposes, I’m fine assuming that the output of a SetEnumerator is sorted.