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.
When upgrading a old NAV database you sometimes need to transfer data to new tables. With the Upgrade codeunits you can manage this easily.
First you make a TableSyncSetup function where you configure your transfer.
And then you make an UpgradePerCompany or UpgradePerDatabase function where you will do the actual transfer.
But recently I got the following strange error when deleting a table.
The system tells me that there doesn’t exists a new table????
This week I started to transform some OnAfter and OnBefore Hooks on tables to Events.
When performing these manuel steps I first though about Upgradeability. Every modification must be upgraded smoothly without any manual handling afterwards.
So what will the result be if I upgrade a customer with the Hook triggers? I tested with a simple example.
The next video in my “How Do I” serie is published by Plataan and Microsoft.
This video is about the new SQL Timestamp feature in Microsoft Dynamics NAV 2016.
Every developer needs to debug every now and then.
But it becomes a challenge when you didn’t wrote every line of code.
Maybe an addon will case the problem.
Default NAV or a CU update can also be the reason.
Or the combination of these.
So where do you begin? First you start debugging and break just before you press the function that causes the problem.
Then you follow every line of code in the debugger. Jump from one codeunit to another. Very time consuming.