Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

Finding child nodes of the table using X++ code

(0) ShareShare
ReportReport
Posted on by 204

Hi ,

I need to list all the child nodes of the table like (fields,field groups , relations etc) and further there properties and sub nodes using X++  code. Is there any reference or sample code ?

  • Martin Dráb Profile Picture
    231,923 Most Valuable Professional on at
    RE: Finding child nodes of the table using X++ code

    Does it answer your question?

    Your latest thread suggests that you may want something else than what you asked for here, but we couldn't know that. I believe that the suggested answer fits the question.

  • Suggested answer
    Martin Dráb Profile Picture
    231,923 Most Valuable Professional on at
    RE: Finding child nodes of the table using X++ code

    Try TreeNodeTraverser. It should look like this:

    #AOT
    
    TreeNode tableNode = new TreeNode(#TablesPath   #AOTDelimiter   tableName);
    TreeNodeTraverser traverser = new TreeNodeTraverser(tableNode);
    TreeNode node;
        
    while (traverser.next())
    {
        node = traverser.currentNode();
        info(node.treeNodePath());
    }

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,233 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,923 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans