Find all Menuitems Linked to a Form

For diagnostics purposes it is often useful to search the AOT for all objects matching cetain properties. For example you may want to find all display menutitems that are pointing to a specific form. The below job illustrates how to simply traverse the Display Menuitems node in the AOT to locate all items who’s “ObjectType” is “Form” and object is a specific form name. E.G. “PurchReqTable”.

 

Search_AOT

Adapting this to search other nodes is as simple as changing the original node instantiation to search a different path as well as changing the AOTgetProperty() method to search through the properties relevant to you.

Happy Daxing

Original community post: https://community.dynamics.com/ax/f/33/p/161258/387257#387257

3 thoughts on “Find all Menuitems Linked to a Form

  1. Note that you can easily find it in cross-references. And if you don’t have cross-references, right-click the node with menu items in AOT, choose Find…, switch Search to All nodes and filter by the Object property on Properties tab.

    • Hi Martin.

      Thank-you for that. I think I’ll try post a walk through with screenshots of your search option above sometime in the future. For some strange reason I’ve never noticed this amazing functionality before and am very grateful to you for pointing it out. I’ll be using it alot in the future.
      I think part of the value of this blog post is to also just illustrate how one could do a basic AOT search in code, so for the moment I think I’ll leave it up for illustration purposes.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">