Skip to main content
Post a question

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

How to get all tables and their fields

Like (0) ShareShare
ReportReport
Posted on 4 Feb 2022 00:47:55 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

  • Suggested answer
    MishaBezede Profile Picture
    7 on 14 Apr 2023 at 16:00:39
    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

  • Suggested answer
    Alireza Eshaghzadeh Profile Picture
    13,587 Super User 2025 Season 1 on 04 Feb 2022 at 12:14:45
    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.

  • Saud Jalil Profile Picture
    34 on 04 Feb 2022 at 06:39:53
    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

  • Verified answer
    Martin Dráb Profile Picture
    232,046 Most Valuable Professional on 04 Feb 2022 at 04:57:33
    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?

  • Akbarpasha Profile Picture
    on 04 Feb 2022 at 04:17:15
    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
    huijij Profile Picture
    19,811 on 04 Feb 2022 at 04:12:15
    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 04 Feb 2022 at 04:04:15
    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

  • Suggested answer
    huijij Profile Picture
    19,811 on 04 Feb 2022 at 03:37:37
    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.

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,280 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,046 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans
Loading started