Codeunit 700 Page Management is a Codeunit that I use once in a while. It has functions to get the Default Lookup Page or the Card Page of a certain table.
It also contains functions to open a Page by only passing a Table ID or a Record. You can run it default or modal and even open a page with an autofocus on a certain table field if you like.
All these functions are very handy, but I only miss one.
In my solution I need to get the table of a certain Page ID. So the opposite way of the existing functions.
By looking to the existing functions you will see that there’s a way. Most of the functions are using a system table called “Table Metadata”, were you can easy find the “Lookup Page”.
But the function “GetDefaultCardPageID” also uses the table “Page Metadata”.
So lets take a closer look to this table.
Recently I experienced a very strange behavior in NAV2016 with SaveValues and Worksheets. I made a worksheet like a Financial Journal with the following properties.
As you can see the “SaveValues” property is on and the “PageType” is Worksheet.
In my previous post I explained how easy it is to do modifications without changing the Menusuite or default code. When implementing this idea in a previous NAV version I experience a strange behavior. Every time I try to print a report I got stuck in an endless loop. The report is printed or print previewed but the request page comes back. Very annoying.
So I investigate this behavior and found that the CAL syntax CurrReport.QUIT doesn’t work as expected in the InitReport Session. As I supposed the report must QUIT executing after this line of code, but for some strange reason it won’t.
To make my idea work I came up with the following alternative.