0

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 Answers 3

2

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.

0
1

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.

4
  • What do you mean? The script provided to you deletes the objects directly via SQL - it is the same approach as described in my first paragraph. It is effective but not "official" one. If the product owner proposed you this approach, I would stick with using it.
    – sergeyol
    Aug 26, 2016 at 8:46
  • Yes, it's using PowerShell's SQL cmdlets to send queries the database. Yes, it's the same approach as you described. In another scenario do you think that those tables are all/enough or might the be other tables that needs to be cleared? There is a gap in my knowledge of the SQL side of NAV here.
    – theschitz
    Aug 26, 2016 at 8:59
  • Yes, this list of tables you provided is good to go. If you are deleting table objects, you might also want to delete the actual tables in SQL (e.g. [Company Name$Table Name]) and its views (e.g. [Company Name$Table Name$VSIFT$nn]), but it is not required.
    – sergeyol
    Aug 31, 2016 at 9:30
  • Thank you! Now my I have a better understanding for how this works :)
    – theschitz
    Aug 31, 2016 at 14:40
0

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.

3
  • Yes of course. The objects not being whiting the license is the base of the question. So your suggestion is just to leave the objects in the database? Not exporting them wouldn't do anything since they still be in the database.
    – theschitz
    Aug 24, 2016 at 5:33
  • Yes create a new database only with objects that do not want to delete. Then compile all object to check the status and if necessary solve the problems. Aug 24, 2016 at 11:52
  • Not really, the answer is the same. I don't know how developed this Script.So you mention the sript updated sensitive tables in NAV That way you make sure it will be alright. Regards. Aug 26, 2016 at 11:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.