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

Welcome - Microsoft Dynamics 365!

Hi All, In this article we will discuss the new introduced member of Dynamics Family. Yes you heard it correctly, one more new member with Name "Microsoft Dynamics 365" . #ProjectMadeira   #Dynamics365

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 - 

MSDYN365BC - Data Upgrade To Microsoft Dynamics 365 Business Central on premises.

Hi Readers, We have already talked about the number of steps for upgrading to Business Central on Premises from different NAV versions. After that article, I received multiple requests for an article which list down steps for Data Migration. In this article, we will discuss steps of data migration to MSDYN365BC (on-Prem) from NAV 2017. For this article, I am considering a Cronus Demo Database without any customization. For an actual upgrade project, we will have to complete object merge using compare and Merge process. After the Merge Process, the next step is data migration. Let's discuss those steps. Direct Upgrade to Microsoft Dynamics 365 Business Central (on-Prem) is from following versions - 1. NAV 2015. 2. NAV 2016. 3. NAV 2017. 4. NAV 2018.