Skip to main content

Upgrade From Classic To RTC - Issue with Line Feed and Horizontal Tab.

Hi All,

Today I would like to discuss a issue that we have during upgrade from Navision Classic Client to Navision RTC Client.

What is the issue ?

The Issue is with the data having Line Feed & Horizontal Tab.

On Which Fields the issue is?

The major issue is with the Primary key field. On Fields other than primary key it dosent make much of the difference.

What is the Reason Behind the Issue?

The Issue normally occurs when customer enter data in system by any of below listed ways -
1. Copying Data from Excel to Navision.
2. Data Inserted in Navision From Integration In Navision with Third Party.

Why Primary Key Field having Issue ?

If the Navision Primary Key Fields have Line Feed and Charter feed in data, it upgrades to SQL in same manner, but the front end (Role Tailored Client) trims these character which trying to Open record. The Role Tailored client display and error message saying "Cannot Open the Record".

How we can resolve it ?

Yes we can do it by creating a Report in Navision which Trims Line Feed and Horizontal Tab from the data. But the Report take so much time if the database size is huge because we need to identify for all text and code Field.

So with a bit of SQL Knowledge I created a Query which we can run before starting the upgrade process. The Query List down Table Name, Field Name and Data that have these special Symbol.

 As these are primary key fields we cannot clear those special symbol from SQL as related records will not be updated.

Like if the customer Number contain these special characters, if we rename the customer from SQL the customer ledger entries will not be updated. 

So without wasting time below is the query and its explanation -

Below are the Pointer Description -

1. Deleting Temp Table if still exist.

2. Creating Temp Table for storing the results of the query.

3. Applying the Filters -
            Data Type = nvarchar (Text and Code)
            Ordinal Position < 22 (explained Later) and
            Table Name like '%$%' (Only Navision Company Specific Tables)

4. Trying to Filter Data With Special Charter ASCII Value (9 & 10)
5. Displaying the result.

Now Let's talk about Ordinal Position < 22 -

1. Every NAV Table in SQL have 1 additional Field "TimeStamp"  ==> Ordinal Position 1

2. Every NAV Table Key can have Maximum 20 Fields. So the Maximum Number of fields in Primary Key = 20. All Fields in Primary Key are Ordinal Position starting from 2 in-respective of NAV Field Sequence.

So total Fields that I would like to check for special symbol = 20 + 1 = 21 Fields.

When we execute the Query, the results will be something like this -

Third Row and First Column shows that the lot not have a Value with Line Feed. We need to rename the Lot No. in Navision. Once the Lot No. is correct then all related records will also get updated.

I would still like someone SQL Help to identify only primary key fields instead of checking for 22 fields.

As it can be one primary key field and not nvarchar like Ledger tables with Integer Primary Key - "Entry No.".

Hope the Query Helps. Please put your comments about the articles.

You can download the query from -

SkyDrive  (File Name - Identify_Special_Character_SQL_Query_V2.0.rar)



** New Update (06-Apr-2016) - An Updated Version of query (faster query) can be accessed here.

Stay Connected.

Saurav Dhyani


Popular posts from this blog

VIEW SERVER STATE permission on SQL Server?

Hi all, Sometime While trying to Login into a database we face an error message as shown below. --------------------------- Microsoft Dynamics NAV Classic --------------------------- You cannot start Microsoft Dynamics NAV Classic because you do not have the VIEW SERVER STATE permission on SQL Server. Contact your system administrator. --------------------------- OK    ---------------------------

NAV 2013 R2 - Cumulative update 12 Released.

Hi all, Please find below the details of  Cumulative Update 12 released for Microsoft Dynamics NAV 2013 R2. Title - Cumulative Update 12 for Microsoft Dynamics NAV 2013 R2 Build No. - 38053 Release Date - October, 2014 Local Version Included - AU, AT, BE, CH, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, SE, UK, RU Download Link Note: Implementing this cumulative update will require a database conversion unless you have already implemented update rollup 5.

NAV 2013 Upgrade Part III - Data Upgrading.

Hi all, As per agenda we need to discuss the data upgrade in NAV 2013. The process is similar to what used to be till NAV 2009 R2 but with some changes. Let's start the process. Remember -  1) You can only upgrade a database to NAV 2013 from NAV 2009 SP1 / R2 SQL Only. 2) The Synchronization of users with SQL Server is no more required.