I would like to see a QueryRef object in NAV.  This object would be similar to RecRef from a developer point of view.

We would be able to create a QueryRef from any query.  QueryRef would then behave similar as a RecordRef, meaning that we would be able to use commands like these.

QueryRef

Behind the scene I would suggest that NAV starts to use the tempdb database. When a QueryRef.OPEN(QUERY::”VAT Entries Base Amt. Sum”) is executed I would like to see a temporary table created in the tempdb database and it would be populated with the SQL command INSERT INTO including all the rows returned by the SQL query.

At this stage everything that is done to a regular NAV table can be done with this tempdb table.  That includes being able to use this in a Page.

QueryInPage

A QueryFieldRef is also required with similar functionality as FieldRef.  You get the point…

One thought on “Christmas wish – Dynamics NAV QueryRef object

  1. Dave Machanick says:

    I agree with you on QueryRef.
    I “double” agree with you on using tempdb for all temporary tables.
    Now that NAV has been exclusively SQL Server for the last 3 releases, it is time to use it for all database activities.

Leave a Reply

%d bloggers like this: