Microsoft Dynamics NAV 2009 How to remove objects outside of license?

1.6k Views Asked by At

During an upgrade process from 2009 to 2016 I'm trying to remove objects relating to an old discontinued product. The objects are not within the range of or license and consists of both Forms, Tables and Reports. When deleting I'm faced with the well known error:

"You do not have permission to delete the '[object name]' Table."

I've tried with my developers license and the customers license with no luck. Since the product is no longer existing there is no use keeping these objects around and I need them gone for the upgrade process.

What is the best approach or technique when deleting objects that's not in the license?

UPDATE: How this issue was resolved? I got in contact with the product owner and explained my problem. They sent me a neat PowerShell script to run. This worked like a charm. Reading through the script I can see that it's using the SQL cmdlets to select and delete relevant data from the following SQL tables:

Objects, Object Metadata, Object Metadata Snapshot, Object Tracking, Object Translation, Permission.

This was the preferred method of the product owner who used to develop this product. It should be applicable to all NAV objects. I have not yet successfully tried one of the answers below (more tries to come). Hopefully this new information will provide someone with enough knowledge to provide a good answer.

3

There are 3 best solutions below

4
On BEST ANSWER

The way which was successfully used by several people but for sure cannot be recommended for production system is to simply delete these objects via SQL from Object and supplemental tables. In case of tables, you would need to manually delete the SQL table itself as well as its VSIFT views.

A bit more better (probably) way is to change the number of the object via SQL and then delete the object via NAV.

The best way is to use the functionality of "killer objects" - which allow to delete objects via FOB import:

http://navisionary.com/2011/11/how-to-delete-bsolete-dynamics-nav-objects/

If you find the partner who can provide you with such killer objects (they need to have a license to create objects in needed range), it solves you problem in a "clean" way.

If not, you may want to consider creating empty objects in 50000 range in some test DB, changing their number to obsolete range via SQL, exporting them as FOB, and then importing them to your target DB with "Delete" option.

0
On

Create new empty database, export only needed objects from old database, import them to new database. In Nav 2016 application database can be separated from data containing database so (I assume) you could just unmount it from database with old objects and mount it to new application database. Not sure tbh.

3
On

It is due to the range of the license, for example your development license has a range of tables 7.000.000 - 7.000.200. If you want to delete a table with ID 20.000.000 you have that error.

The best solution is when you do the updrage do not you consider these objects you need to delete. Exports all objects except the objects you want to delete.