Tag Archives: error

Dynamics NAV “The Object table does not exist.” error

The Problem

One week ago we started experiencing problem with compiling and importing objects into our clients test database. The error which pop-ups is the “The Object table does not exist.”. Aaaah… we had our share of headaches with NAV 2013 R2 architecture and we are sceptic about everything in nowadays.

The problem was even more curious because the same database worked well in our development environment. When we restore the SQL backup on our client’s test environment we cannot import or compile objects.

The Resolution

What I have determined, after SQL tracing, is that we had transfered trigger, in Object table of our development NAV database, along with the SQL backup :).

The trigger is used for SourceSafe database, for Object table on our development databases, so we could roll-back objects that had been changed or deleted and we had to restore previous versions.

The misleading of the displayed error was in the unfortunate coincidece of the name of “Object” tables both in our SourceSafe and NAV databases.

Dynamics NAV NAS server error “Function sequence error” & “Invalid cursor state”

The problem

While trying to setup NAS server for client to do the nightly Job Queue events we were stuck with the problem of NAS failing to do anything after starting up.

In the event log there were three Event ID 20010 Warnings:

The following ODBC error occurred:
Error: [Microsoft][ODBC Driver Manager] Function sequence error
State ID: HY010
The following ODBC error occurred:
Error: [Microsoft][ODBC SQL Server Driver]Invalid cursor state
State ID: 24000
The Application Server for Microsoft Dynamics NAV NAVSRVAPL-SQL could not initialize properly.
The server will attempt to initialize every 30 seconds until this
is successful.

When starting without any jobs in the Ready state NAS would initialize but didn’t have these warnings because it had nothing to do.

The Resolution

After series of investigations we came up with the clue to investigate further. I created the test table that had only two fields: 1. Primary key, 2. Datetime. As the primary key field was setup as Autoincrement we managed to recreate the error we saw with NAS using the same user that was used to start NAS. This was strange because this user had dbo role in SQL server that is required for user when using Autoincrement property – as NAV Development Documentation states. When removing Autoincrement property from the primary key field the error didn’t appear anymore.

We setup simple codeunit, that would increment this simple table, in Job Queue but the problem reappeared again. After “digging deep” in the NAS initialization process in standard NAV codeunits we found out that the two tables that are used in this process also had Autoincrement property set to YES. These are tables 405 Change Log Entry and 474 Job Queue Log Entry.

Because inserting records in these two tables were failing the NAS failed to do anything but to report error. We removed Autoincrement property and added code to populate primary keys of these two tables incrementaly. After that the NAS started normally and was executing jobs in Job Queue.

The Conclusion

We believe that the problem is, still, with the assigned SQL rights for the user that is running NAS, although it had db_owner rights on that database, but we could not investigate further because this was production environment. All the other NAS implemenations were working properly without this “intervention” on the standard Microsoft Dynamics NAV code or tables. But this is the workaround we had to implement to overcome this situation.


After moving client’s database to another SQL server this problem went away (as did the few other). This encourages me to believe that the db_owner rights were messed up somehow on initial SQL server.

Dynamics NAV 2013 RapidStart package import error

RapidStart Services are introduced in Dynamics NAV 2013 as a mean of quickly setting up a new company with predefined data. It has great benefits for NAV implementers when working with new clients or setting up new company in test environment.

While working on localization of NAV 2013 for Serbia we started having problems with importing Rapidstart package files. The error we got, while testing, was “The specified file could not be imported because it is not a valid RapidStart package file.

Error window

We have found out that the problem was in Codeunit 8619 Config. Pckg. Compression Mgt. The function IsGZip did not return true in our case, although the file was created with the same database for NAV 2013.

The source of the problem was that the Windows Server, on which our NAV Server was installed, had Regional Settings for Language for non-Unicode programs set to “Serbian (Latin, Serbia and Montenegro (Former))”.

So we had two options to resolve the error.

First solution

This was simple as setting the Regional Settings for Language for non-Unicode programs set back to English (United States). After restarting the Windows Server the error was gone. I would recommend this solution wherever this setting does not interfere with other software installed on NAV Server.

Second solution

This solution is “not the best option” but it is focused on changing the IsGZip function in Codeunit 8619 Config. Pckg. Compression Mgt. so it returns TRUE after uploading file to NAV Server. I would not recommend this solution but if there are no other options then…

Metadata for object of type CodeUnit with id ***** is in a failed state.

While developing Windows Embedded 6.5.3 application for WMS (Warehouse Management System) which relies on Dynamics NAV web services I have encountered rather “familiar” error:

Metadata for object of type CodeUnit with id ****** is in a failed state…. error CS1001: Identifier expected.

OK, I said, I will recompile the object and restart Microsoft Dynamics NAV Business Web Services.

Recompile, restart… same error. What now? Hmm… restart Web Services Windows Service again. Nope!

Went into code and view the last function I have edited. Nothing suspicious. Compile – everything OK. Puf?!

Let’s go to error again (reading it whole this time). Whoa… Error details info:

…Error details: c:\ProgramData\Microsoft\Microsoft Dynamics NAV\60\Server\MicrosoftDynamicsNavServer\source\Codeunit\Codeunit50004.cs(498,163) : error CS1001: Identifier expected

Ok. Let’s open the error details file. It opens in Microsoft Visual Studio Tools for Applications. Went to line 498 and position 163 and I can see the following line of my function (with source in C#) which ends like:

CS1001_identifier_expectedThere is Int32 param in my function without identifier (which the error clearly states)!

Went back to my codeunit in NAV and opened C/AL locals of the function I have edited and I have something to see. There is a parameter WITHOUT NAME of Integer Type.

dynamicsNAV_identifierexpectedSomehow, while editing parameter list I have, inadvertently, created new parameter row, never assigning a name to it. NAV thinks this is OK and allows the codeunit to be compiled, but the NAV Business Web Services doesn’t like this.


Resolution was simple. Removed the “unintentional” parameter, recompiled codeunit, restarted NAV Web Service and everything was fine, again. 🙂



No execute permission on ” CodeUnit with ID 1.

When our client tried to connect with RTC to the application server he got error:

No execute permission on ” CodeUnit with ID 1.

The problem was raised when the client’s administrator was instructed to tighten NAV security assigning each user “Role ID” and “Company Name” in Logins->Roles.

After that the users could not login to the application server giving them previous error.


I found the solution on another blog (http://thinkaboutit.be/2012/07/no-execute-permission-on-codeunit-with-id-1/)

Basically the “User personalization” was not set for users that had “Company Name” assigned to their login Role. “User personalization” is found under Administration->Application Setup->RoleTailored Client->User Personalization.

User Personalization
User Personalization.

Creating new record with user who has a “Company Name” assigned should solve the RTC login error.