How to find out what objects belong to a Customer license?

The answer to the title line question is really easy, just check the text file that can be downloaded from the Partner Source.


What if someone (read: previous NAV partner) has been naughty and used a test or development license on a Customer database? And now you have been given a task to implement REAL license to Customer database?


We all should know what happens if development or testing license is used in a Customer live environment; Customer probably has been using features their license does not cover, and there is entries in Ledger tables that do not belong to the Customer license, and some setup tables have data which causes the REAL license failing to work. Customer gets error dialogs like "You do not have the following permissions on TableData Responsibility Center: Read".

Cleaning these tables is a mess, but today I found a nice tool, and used some creative thinking to achieve this goal on one Customer.

I found out that a fellow blogger Olof Simren has created a cool tool to delete data from NAV tables in order to create an empty Company from a Company that has been used as a test Company, including posting of invoices and Ledger entries.

The tool for NAV 2015 (works nicely also on NAV2018) can be downloaded from here.

Olof's Record Deletion Tool is really nice. It can even suggest what tables you need to clean in order to start with the clean company. However, the tool does not know what objects belong to the license. To achieve this goal, I added the t50090 Record Deletion table a new boolean field "Locked", and cu50090 Record Deletion Mgt. codeunit a new line:

InsertUpdateTables()
Object.SETRANGE(Type, Object.Type::Table);
IF Object.FINDSET THEN
  REPEAT
    RecordDeletionTable.INIT;
    RecordDeletionTable."Table ID" := Object.ID;
    RecordDeletionTable.Company := COMPANYNAME;
    //++001 UKo
    RecordDeletionTable.Locked := Object.Locked;
    //--001
    IF RecordDeletionTable.INSERT THEN;
  UNTIL Object.NEXT = 0;

After that I changed the license of the Development Environment to use the REAL Customer license, painted all Table objects blue, and used "Lock" selection from the right-click menu to all of the objects.

Now this is nice function. When you lock objects, you can lock only those objects that actually belong to the license you are currently using!

Then I run p50090 Record Deletion page, and populated the tables. Then it is an easy task to filter only those tables that are not locked. These are the tables you need to clear or add to the REAL license!

 

edit: added error message in plain text to help Google

Comment List
Anonymous
Related
Recommended