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 :
Microsoft Dynamics AX (Archived)

How to read Table Method and classes Method content through X++ code & store in some medium(table memo field, xml file etc.)

(0) ShareShare
ReportReport
Posted on by 75

Hi all, 

I have a requirement wherein I need to traverse to the ABC table, find Fields, IndexID's etc., and store the names of Fields, IndexID's, method etc. into XYZ table. - This is done.

similar I'm able to Traves from table to a method node and store method name in the table, along with the table.method name I need to read the table.method content(code) and store in XYZ table memo fields.

How to read the table.method() code? Any help

Thanks in advance and 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mea_ Profile Picture
    60,286 on at

    Hi GopalRC,

    You can use treeNode.AOTgetSource() method and you can get treeNode using something like:

    #AOT
    treeNode  = TreeNode::findNode(#ClassesPath + @'\testClass\test_method');

  • GopalRC Profile Picture
    75 on at

    Hi Ievgen Miroshnikov,

    I have already tried the similar way you said in earlier reply.

    treeNode  = TreeNode::findNode(#TablesPath+@"\"+_tableName+@"\"+_dictTable.objectMethod(i));  // _tableName and _dictTable.objectMethod(i) are parameter 

        this return me Null "treeNode" value.

    if use same without method name parameter it returns me the path.

        treeNode  = TreeNode::findNode(#TablesPath+"\\"+_tableName)                      

    Any other suggestions?

  • Verified answer
    Mea_ Profile Picture
    60,286 on at

    I missed 'methods', this works

    TreeNode treeNode  = TreeNode::findNode(#TablesPath + #AOTDelimiter + identifierStr(CustTable) + #MethodsPath +  #AOTDelimiter + 'address');

  • Suggested answer
    GopalRC Profile Picture
    75 on at

    Ton's of thank you. It works! :-)

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Andrew Jones a1x Profile Picture

Andrew Jones a1x 2

#3
GL-01081504-0 Profile Picture

GL-01081504-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans