There was a question recently on the Dynamics Community forums about finding out which enumeration to use behind an int type. It turned out that the table, field and enum in question was part of the kernel. Those entries reside under the System documentation node of the AOT, and they do not provide much meaningful details. Reflection works on them as well, so you could use the tooling the same way as on regular objects (Dict*, TreeNode objects). Here is a code snippet to read the AOT property for kernel objects.

static void Job1(Args _args)
            new DictField(
                fieldNum(SecurityPermission, Access))

You may also find some examples within the official documentation on how to use reflection. This example is getting class decoration of a method:

A fellow blogger, SysDictCoder has published some details on it as well about a decade ago.

You can do some really neat tricks, like compiling and executing custom code runtime with the XppCompiler framework (similar to RunBuf).

This tradition has been kept in Microsoft Dynamics 365 for Finance and Operations as well. It went through a lot of changes though, starting with keeping the source code (ModelStore) in an XML structure. Joris has a series of articles worth reading about the topic.

The new way of accessing this information is through MetaData providers. You can find some excellent articles on the topic, here are some examples:

I also had to play around with MetaData a bit in MSDyn365FO related to our code upgrade. Peter Villadsen from Microsoft gave a great idea during the Microsoft Technical Conference couple of years back. My next post will be about that, using the tool called BaseX to scan the source files for valuable information.