Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

Finding child nodes of the table using X++ code

Posted on by 200

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
    Martin Dráb 230,214 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
    Martin Dráb 230,214 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans