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

Send Mail with Attachment From Navision.

Hi all, We have seen how to save a report into PDF and how to send mail to a customer. Let's link these two post in one i.e. Mailing statement to a customer into PDF Format. This article is part of the Series. Please Refer  Table of Content here . If you have the old objects set let me brief you what I will be changing - 

Microsoft Dynamics NAV 2016 - How to Configure Phone Client.

Hi All, In this article we will discuss how we can connect Microsoft Dynamics NAV 2016 with New Client Launched i.e. Phone Client. This Article Contain Steps for a Android Phone as I have Only Android Phone. I am doing it having all tiers on my windows 8 machine, steps remain same for multiple servers but issues might be different. What we Need (Other what we discuss in this article) -  The Service Tier should be on Public IP . Some of the Data-card does not Provide you Public IP. check it for sure.

Download Microsoft Dynamics Business Central on Premises 2020 Wave 2 Release.

 Hi Readers, As Expected Microsoft have released #msdyn365bc 2020 wave 2 is available.  This article provides details of the new release. The 2020 release wave 2 for Business Central delivers a wealth of new features. Read What's new in 2020 Release Wave 2 here .  Dynamics NAV Customers upgrading to Business Central on Prem will be able to run business central on premises, move to cloud or choose a hybrid approach.