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

Community site session details

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

How to get all tables and their fields

(0) ShareShare
ReportReport
Posted on by

Hi All,

Is it possible to get all the tables and their fields in D365FO , is there any Microsoft document available or do we need to write a code to get all the tables and fields.

Please advise us.

Regards,

Akbar

I have the same question (0)
  • Suggested answer
    huijij Profile Picture
    19,811 on at
    RE: How to get all tables and their fields in D365FO

    Hi Akbarpasha,

    You may refer to the link which contains the documentation available for the System classes. But it is not a complete list of the System table members.You can find a complete list of tables and their members in the Application Explorer.

  • Akbarpasha Profile Picture
    on at
    RE: How to get all tables and their fields in D365FO

    Thank you Judy,

    We need the list of table and their fields, do we need to write any code to get all in one result.

    Regards,

    Akbar

  • Verified answer
    huijij Profile Picture
    19,811 on at
    RE: How to get all tables and their fields in D365FO

    There is no out of the box list for this, suggest you to write code to get all in one result.

  • Akbarpasha Profile Picture
    on at
    RE: How to get all tables and their fields in D365FO

    Hi Judy,

    Do you have any idea about the code to get the tables and fields list.

    Your help will be really appreciated.

    Regards,

    Akbar

  • Verified answer
    Martin Dráb Profile Picture
    236,320 Most Valuable Professional on at
    RE: How to get all tables and their fields in D365FO

    There are several options. You can look into SqlDictionary table. You can use the new metadata API, or the old API (DictTable etc.). You can also look directly to database, but note that it looks differently than in AOT (e.g. because how table inheritence is implemented).

    By the way, what is the business problem that you're trying to solve by listing all tables and fields?

  • Saud Jalil Profile Picture
    34 on at
    RE: How to get all tables and their fields

    Hello

    It is not recommended getting all columns from all tables as it will make your project bulky and slow but still if you want to retrieve all the data from DB, following article might help you.

    stackoverflow.com/.../how-can-i-get-all-data-in-all-tables-and-rows-in-a-sql-server-database

  • Suggested answer
    Alireza Eshaghzadeh Profile Picture
    14,616 Super User 2025 Season 2 on at
    RE: How to get all tables and their fields

    Hi Akbarpasha,

    From D365FO UI, You can install extension for Table Browser caller for chrome, then you have access to  tables lists and you can find their fields via Table browser.

  • Suggested answer
    MishaBezede Profile Picture
    7 on at
    RE: How to get all tables and their fields

    Here's the Power Query that worked for me (for your scenario replace "yourdomain.yourenvironment.dynamics.com/data" with your URL and {"table1", "table2", "table3"} with the actual list of tables prepared in advance in Excel):

    let

       Source = OData.Feed("yourdomain.yourenvironment.dynamics.com/data"),

       GetAllTables = (tableList) =>

       let

           GetTableColumns = (tableName) =>

           try

               let

                   tableData = Source{[Name=tableName, Signature="table"]}[Data],

                   columnNamesList = Table.ColumnNames(tableData),

                   concatenatedColumnNames = Text.Combine(columnNamesList, ", "),

                   resultTable = #table({"Table", "Columns"}, {{tableName, concatenatedColumnNames}})

               in

                   resultTable

           otherwise

               #table({"Table", "Columns"}, {}),

           allTables = List.Accumulate(tableList, #table({"Table", "Columns"}, {}), (state, current) => Table.Combine({state, GetTableColumns(current)}))

       in

           allTables,

       TableList = {"table1", "table2", "table3"}, // Add your table names here

       Result = GetAllTables(TableList)

    in

       Result

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

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

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 2,122

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 918 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 646 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans