web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

How to search in all the projects

(0) ShareShare
ReportReport
Posted on by

Hi guys, 

I have to make a class that creates a new project but needs to find  the nodes from all projects.

I have class in ax 2012 but i don't know how to make it work in 365.

the code in 2012 is this

public void run()
{
ProjectNode projectNode;
TreeNodeIterator treeNodeIterator;
;
if (treeNodeAOTName)
this.processNode();
else
{
projectNode = infolog.projectRootNode().AOTfindChild("Shared");
treeNodeIterator = projectNode.AOTiterator();
this.parmTreeNode(treeNodeIterator.next());
while (treeNode)
{
this.processNode();
this.parmTreeNode(treeNodeIterator.next());
}
this.deleteNotExistingProjects();
}
}

i need a class like aotfindchild and how to make it work on all projects. just like above where it searches in shared projects

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    303,730 Super User 2026 Season 1 on at

    Hi IV28,

    What would be the purpose of this effort? What is your business requirement? There is a split between the business user experience and the development environment now with Dynamics 365. Do you want to create something for a business user or a development tool?

  • Sukrut Parab Profile Picture
    71,735 Moderator on at

    The thing you are trying to do is not possible  with your current code because projects are created in Visual studio. If you want to search anything with in visual studio in  application explorer start using metadata search .

  • Blue Wang Profile Picture
    Microsoft Employee on at

    Hi IV28,

    You can use metadata search.

    Besides that, you can also use the shortcut Ctrl + Shift + F to search through the query box.

    7848.PNG

  • Community Member Profile Picture
    on at

    thanks for your answer.

    It's a development tool. And i have to search in all projects if a project or a specified class exists.

  • Community Member Profile Picture
    on at

    And i have to do the search and find in a method so that is works on everything.

  • Verified answer
    Martin Dráb Profile Picture
    239,040 Most Valuable Professional on at

    As mentioned, projects don't exist in AOT at all. If you want to search Visual Studio project files, forget everything in AX, because it's simply not there. Also, forget X++ when building a development tools - you should create a Visual Studio extension (probably in C#) searching Visual Studio files; you shouldn't change the ERP system for it.

    Visual Studio has an API for working with project files; that's one option. Or you can parse the files by yourself.

    Note that projects contain only references to files; you won't find things like methods there. For that, you can either use the Metadata API or parse the files inside Packages folder.

  • Suggested answer
    Mansour Yahya Mohamad Profile Picture
    Microsoft Employee on at

    As mentioned earlier, in D365FO projects are created in VS and not part of the AOT. You can use the standard MetaData search.

    For searching objects properties (e.g. Classes), you can use the  Microsoft.Dynamics.Ax.Xpp.MetadataSupport API, below is a code example wherein you might get inspiration to do your development work:

    using Microsoft.Dynamics.Ax.Xpp;

    using Microsoft.Dynamics.AX.Metadata.MetaModel;

    using Microsoft.Dynamics.AX.Metadata.Core.Collections;

    class GetAssetClarificationClass

    {

       public static void main(Args _args)

       {

           System.Collections.Specialized.StringEnumerator tables = Microsoft.Dynamics.Ax.Xpp.MetadataSupport::TableNames();

           while (tables.MoveNext())

           {

               AxTable table = Microsoft.Dynamics.Ax.Xpp.MetadataSupport::GetTable(tables.Current);

               var fields = table.Fields.GetEnumerator();

               while(fields.MoveNext())

               {

                   AxTableField field = fields.Current;

                   Info(strFmt("Table name: %1", table.Name));

                   info(strFmt("Field name: %1", field.Name));

                   Info(strFmt(" Asset Classification : %1", field.AssetClassification));

                   break;

               }

               break;

           }

       }

    }

  • Community Member Profile Picture
    on at

    Martin one more question. How do i take the path from packages so that i can do a search on the package. or how do i take programatically the path to be more precise. Because i know the folder of the workspace for projects but i don't know how to get it by code

  • Martin Dráb Profile Picture
    239,040 Most Valuable Professional on at

    What exactly are you trying to achieve at the moment? Which folder do you mean? The one with projects or the one with the actual files? You mentioned both.

    It would help if you explained your goal rather than just asking about little implementation details. It would allow us to fill in gaps in your description and maybe provide a better solution than what you've designed by yourself. You would benefit in both cases, therefore explaining your functional requirements in your own best interest.

  • Community Member Profile Picture
    on at

    Hi,

    My goal is to take all the projects that i have  into my source control workspace, read the content of all of them and make a list with the included ax objects(tables, edts, classes, etc). For achieving this, first i need to know the path where the projects are located, under my local workspace

    5466.P1.png

    4527.P2.png

    After i'll succeed to get the path i'll loop over all the folders of my projects, i'll read the .rnrproj file and i will find out all the objects contained into each project

    P3.png 

    After i will read the content of all my projects i can do some operations between them (union, intersect) in order to know if  some of the objects are included in multiple projects and so on.

    Thanks

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 616

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 460 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 331 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans