microsoft-dynamicsnavisiondynamics-navdynamics-nav-2013

Dynamics Nav 2013 View Database Table during debugging session


Is it possible to view the contents of a Dynamics NAV 2013 Database Table while being in a debugging session?

When I go the development environment I can normally hit run on any table and explore its contents. How ever, while the debugger is running, this is not possible, since the whole Dynamics Nav environment is frozen when the debugger stops on a break point.

One work around I have found, is to copy the relevant data to excel before running the debugger, but that is not so convenient. Also, in the watch list of the debugger, I can only view single variables, but not the whole database table.


Solution

  • You can simply open Sql Server Managemant Studio and have a look at the tables. Of course, you will see the changes only when they are commited. so either the code in NAV has passed the actual trigger where the record is modified or you explicit call COMMIT();

    If you never used sql server management you will notice that the tables are stored with the company nam e ahead.

    For example the item ledger entry in demo database is:

    [CRONUS AG$Item Ledger Entry]

    and a select statement for reading all records in the table could be

    SELECT * FROM [Demo Database NAV (7-0)].[dbo].[CRONUS AG$Item Ledger Entry]

    Regards

    Alex