DAXRunBase
  • Home
  • Blog
  • About
  • Our Company

Find standard code overlayering in Dynamics 365 FO

We are preparing for the code upgrade from AX 2012 R3 to D365FO 8.1, the latest version recently released. As you know it is extensions-only, meaning we are not allowed to modify any of the standard objects directly. I would strongly suggest to familiarize yourself with Extensions if you are planning to go down this journey as well. An important part of this is that you need to send in Extensibility requests via LifeCycle Services, for code that cannot be moved to a pre- / post-event handler. Our large number of customized methods came out well above 1000+ overlayered objects when we ran the LCS code upgrade tool on our modelstore. We had to find standard code overlayering of all methods to narrow down the search on what should be inspected for extensibility.

I have been exploring the options to use the MetaData API for extracting package information of methods. We wanted to find any methods, which belongs to both a standard, and a custom package, like ApplicationPlatfrom and ApplicationPlatform.JAD (our module). That did not lead to anything useful other than realizing that you can only access such details up to the root node level (table, class) currently. Here is the code piece for partial results: (more…)

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

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 ALD alerts AOT AX 2009 AX 2012 AX 7 cache compare compile compression control Convergence D365FO database DIXF Dynamics 365 e-mail EDT fields fix job kernel label layer license metadata migration model performance PowerApps PowerShell reflection security 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