Tuesday, October 6, 2015

New MetaData Virtual Tables in NAV 2016

In NAV 2016 there are four new metadata virtual tables were introduced and those are

  • Table MetaData ((2000000136)
  • Codeunit MetaData ((2000000137)
  • Page MetaData (2000000138)
  • Report MetaData ((2000000139)

All these tables are read-only and has all the metadata information about the respective objects. The information which you can access in previous version by looking at the properties (Shift + F4) of the object, now you can access all that information from these tables.

For ex: If you select any table and select properties of the table (Shift +F4) you will see the below information


Since virtual tables cannot  be accessed directly from the object designer I created a new page with source table as Table MetaData , and when I ran the page and checked the information in that table about Payment Terms Object, I can see all the above information from the table except the CaptionML and Description, which I believe is very useful.

If you ever want to access properties of an object, you can just create a variable of that subtype and access all the information. Ex: If you ever want to know what is the CardPageID of a page or if InsertAllowed on the page, then you can access it using code.


Same is true for codeunits, pages and Reports.

Please leave your comments, feedback or any suggestions you have for me to improve me my blog and also if you have any questions, feel free to post..

Microsoft Thanks for adding these tables.



Unknown said...

Hi Suresh Kulla,
Great blog and thanks for sharing.
I have worked with NAV the last 25 years, and I have never missed this feature/function. Can you give a "real life" example of how this will be useful?

Suresh Kulla said...


Thank you for the comments, this tables are newly addded in NAV 2016 and as mentioned in the blog,this information was available in previous version using properties but not accessible using code.

I am not sure if i have a good example at this moment about the usage but one thing i can think of its usage is in integration project or outside applications which don't have access to navision application and if they want to find out any of those information it is available now through these tables.

Thank you

Unknown said...

It is curious that the description and multi-language caption are missing in these new virtual tables. I was thinking of a good use for accessing these properties with code. For example, say that you create a report request page and add a field to use for some conditional formatting on the report; perhaps an option for additional detail like assembly kitting on the sales order confirmation. You could have actions to launch the report with this option preset one way, or the other way on the report request page. Now you are making an assumption though that the report implements the request page option; if the report selection chooses a report object that does not have this field on the request page, the assumption is incorrect. If however you could access metadata that indicated the request page includes a certain field, you could then code for either circumstance. Unfortunately, the property I would think of using here is the description which is missing in action so to speak in the new virtual tables.


Unknown said...

I don't quite understand the last tips you mentioned. can you explain it more specifically?

what is lost.dir android