Dynamics - Migrating from 2009 to 2013

Hi,

We are in the process of Migrating from Dynamics 2009 to 2017. But we are stuck migrating from 2009 to 2013, we have managed to Transfer Data but during the “Delete Objects” we are receiving an error "You do not have permission to delete the ‘PortalServices’ CodeUnit. We have tried granting all permissions to the Nav Users in SQL Server but we are still experiencing the same issue.

I have attached screenshots with the errors

I don’t know of any standard table called PortalServices, so my guess is that this is from a 3rd party solution. And if this codeunit number is not within the number range of your license, then you cannot delete it with your license.

If you don’t have a license for this object, then you can either leave it, or you can delete it directly from SQL.

Thanks for the quick response. Wistfully we cannot skip this process without the error popping up. Could you guide me on how or where this CodeUnit can be deleted from SQL??

Hi akeldenise,

Check this thread:

https://dynamicsuser.net/nav/f/developers/84710/deleting-objects-hich-are-not-on-the-license

here is a comment from Erik, that, perhaps, will help you:

The way I have used to remove (and even edit) protected objects, have also been to change the “object id” in the SQL object table to a number I have permissions to. And then into the designer and delete them.

Hi Ponç J. Llaneras (pjllaneras) Followed the steps on the Link but it still gives me the error whenever i create a new object with the same ID (39004010) on any new Database (Am assuming its an issue with the Licence with that Range). Guess am left with deleting the Object in SQL, which would be the best way to perform this??

Hi kaeldenise,

In the comment by Erik, he talks about changing “object id” in SQL object table to a number you have permissions to.

Otherwise, you can check the following post to create a “killer object”:

www.archerpoint.com/…/killer-objects

You cannot create an object with 39004010 if you don’t have it in your license. So you need to “backup” this object as a FOB file before deleting, and then import it (using the FOB file) before applying your new 2013 objects.

You write a small script to DELETE FROM OBJECT WHERE ID=xx AND Type=yyy. Remember, do it in a dev/test db - never in a production database.

[mention:61b2aa9ce72e429baa1ef43208ddbea4:e9ed411860ed4f2ba0265705b8793d05] I have managed doing the backup. Which Object should i refer to?? Rectify me where am going wrong below;

DELETE FROM OBJECT WHERE ID=39004010 AND Type=5

Reference:
Type ID Name Modified Version List Date Time Compiled Locked Locked By
5 39004010 PortalServices No Web Portal 11/25/13 8:37:15 AM Yes No

Hi Kaeldenise,
That looks correct to me.

Thanks Erik, the above when I deleted the Object through SQL Management Studio.

But now this pops up during the Deletion Process:

--------------------------- Microsoft Dynamics NAV Classic ---------------------------

It is not possible to delete a table definition (the Employee Portal Setup table) if there are records in the table. Delete all records in the table for all companies before deleting the definition.

--------------------------- OK ---------------------------

What would be the easiest way in clearing all records in the above mentioned tables??

You were previously only talking about a codeunit, or one of the other objects deleted by the upgrade toolkit. The UT doesn’t delete tables, as this is not required to upgrade.

But anyway, tables cannot be deleted this way. At least not as easy.

May I assume that these objects are used by an add-on included in your 2009 database and that these are not to be part of your 2013 license?

Then you should make a codeunit to delete the data in 2009 with a license which does allow to delete data.