DAXRunBase
  • Home
  • Blog
  • About
  • Our Company

AOT property for kernel objects are readable via reflection

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.

C#
1
2
3
4
5
6
7
8
9
10
static void Job1(Args _args)
{
    info(strFmt('%1',
        enumId2Name(
            new DictField(
                tableNum(SecurityPermission),
                fieldNum(SecurityPermission, Access))
            .enumId()))
        );
}

You may also find some examples within the official documentation on how to use reflection. This example is getting class decoration of a method:
https://docs.microsoft.com/en-us/dynamicsax-2012/developer/how-to-use-reflection-to-get-attribute-class-metadata

(more…)

DAXRunBase / 2018-10-05 / AX 2012, Dynamics 365 for Finance and Operations / 0 Comments

Subscribe

  • RSS Feed for Posts
  • LinkedIn
  • Email
  • Twitter
Vilmos Kintera Microsoft MVP
ERP Technical Solution Architect and Developer
CEO @ DAXRunBase Consulting Kft.
Head of AX @ JJ Food Service Limited

Tag Cloud

#MSDyn365FO AIF alerts AOT AX 2009 AX 2012 AX 7 Azure cache compare compression control Convergence D365FO database DIXF Docs Dynamics 365 e-mail EDT extended data type fields fix Ignite job kernel label layer license metadata migration model performance PowerShell report SQL statements synchronize tables Technical conference TFS TreeNode users X++ XPO

Categories

Archives

  • October 2018 (4)
  • September 2018 (3)
  • June 2018 (1)
  • March 2018 (3)
  • February 2018 (3)
  • September 2017 (2)
  • August 2017 (1)
  • July 2017 (2)
  • June 2017 (3)
  • May 2017 (3)
  • February 2017 (1)
  • January 2017 (1)
  • November 2016 (1)
  • September 2016 (3)
  • August 2016 (3)
  • May 2016 (1)
  • March 2016 (2)
  • February 2016 (4)
  • January 2016 (2)
  • December 2015 (3)
  • November 2015 (5)
  • October 2015 (4)
  • March 2013 (1)
  • December 2012 (1)
  • November 2012 (1)
  • October 2012 (2)
  • August 2012 (2)
  • August 2010 (1)
  • June 2010 (1)
  • April 2010 (3)

Recent Posts

  • Synchronize Models between workspaces in MSDyn365FO
  • Developer VM performance for MSDyn365FO
  • Find standard code overlayering in Dynamics 365 FO
  • AOT property for kernel objects are readable via reflection
  • Microsoft Ignite 2018 day 1 recap

Microsoft Dynamics AX Community

DAXRunBase © 2019 DAXRunBase

Microsoft Dynamics AX inside-out