Saturday, April 29, 2017

Internal error 52033 in module 93


During last week I was upgrading a 4.0 DB to NAV 2017. While opening the database from Microsoft Dynamics Classic Client, I got below error message. 

Microsoft Business Solutions-Navision
Internal error 52033 in module 93. 
Contact your dealer if you need assistance.

In order to resolve the error, you need to add T4616 to SQL Server Startup Parameter list. Please do follow below steps,

1. Open SQL Server Configuration Manager.
2. Select MSSQLServer Properties.
3. Navigate to Advanced Tab.
4. Select the Start up Parameter.
5. Navigate to End of the line and add String ;-T4616 as shown below.

Please provide your feedback with a comment. 
Thank you and Regards,
Tharanga Chandrasekara

Friday, March 31, 2017

Quick Fix : OLE control or Automation server identified by GUID-{F9043C85-F6F2-101A-A3C9-08002B2F49FB} not found

If you are working with a version of Microsoft Dynamics NAV, then most probably you might be familiar with below error message. 

This message is for C/AL Programmers:
Could not create an instance of the OLE control or Automation server identified by GUID-{F9043C85-F6F2-101A-A3C9-08002B2F49FB}.
Check that the OLE control or Automation server is correctly installed and registered.
GUID always helps to find the root cause for the issue. (Google GUID and you will get list of solutions)

In this case GUID {F9043C85-F6F2-101A-A3C9-08002B2F49FB} refers to the "Microsoft Common Dialog Control, v6.0". 

This normally get installed and placed in below folder path : "C:\WINDOWS\System32\comdlg32.ocx' and C:\Windows\SysWOW64\comdlg32.ocx"

  • Download "comdlg32.ocx" from here.
  • Copy downloaded file to below two folder path
    • C:\Windows\System32
    • C:\Windows\SysWOW64 
  • Run command prompt in administrator mode (Run as administrator)
  • Run below two commands in command prompt to register comdlg32.ocx
  • 1:  regsvr32 c:\Windows\system32\comdlg32.ocx  
    2:  regsvr32 c:\Windows\SysWOW64\comdlg32.ocx  
  • After each command you will get individual confirmation messages. 
Please provide your feedback with a comment. 
Thank you and Regards,
Tharanga Chandrasekara

Quick Fix : There is no system code page on your computer that matches the code page of the collation for the database.

If you are still using a old version of Dynamics NAV or if you are trying to upgrade old version to a newer version of Dynamics NAV, then you might have a chance of getting below error message when you open up the database from Classic Client. 
---------------------------Microsoft Dynamics NAV Classic---------------------------
There is no system code page on your computer that matches the 850 code page of the SQL_Latin1_General_CP850_CI_AS collation for the XXXXXXXXXXXXXXXX database.
Your system code pages are: ANSI: 1252, OEM: 437.
Ensure that the Regional Options of the computer use the correct system language and locale for the code pages to match.
You can also disable the 'Validate Collation' setting for this database. It is possible that certain text data will not be converted correctly when stored in the database.
Click OK to disable the 'Validate Collation' setting and continue to use the database, or click Cancel to exit.
---------------------------OK Cancel ---------------------------
This error us due to your DB collations is different from your computer collation. You can have a quick fix to resolve this error however you might need to talk to your system and DB admin for a permanent solution. 

Quick Fix:

You need to change registry value in your computer to required Code page. In order to do that,

1. Press Start + R : To open Run Window
2. Enter "regedit" and click OK to open "Registry Editor"
3. Navigate to below path and find the OEMCP
4. Double click on the OEMCP and change Value Data to 850.

 [HKEY_LOCAL_MACHINE \SYSTEM \CurrentControlSet \Control \Nls \Codepage] OEMCP = "850" (Default = 437)  

5. Restart Your computer to update registries. 

Please provide your feedback with a comment. 
Thank you and Regards,
Tharanga Chandrasekara

Sunday, March 12, 2017

Quick Fix : Visual Studio displaying NAV Report Layout as XML

I got this issue with Visual Studio 2015 Enterprise Edition. 

Every time I open a Dynamics NAV report layout in Visual Studio, RDLC is rendered as XML file instead of visual layout with all the fields and tool boxes. 

How the report layout looks: 

FIX : In order to fix the issue you need to install "Microsoft SQL Server Data Tools"

To install "Microsoft SQL Server Data Tools" you need to go to 
Control Panel  -> Programs and Features - > Microsoft Visual Studio <Edition> -> Change

Or you can re run the installation setup. 
From the features list, enable "Microsoft SQL Server Data Tools" option and proceed. 
Once the installation is completed you are good to go. This time report layout will open in correct design layout. 
Hope this helps you to resolve the issue. happy designing. 

Please provide your feedback with a comment. 
Thank you and Regards,
Tharanga Chandrasekara

Saturday, March 11, 2017

Best Practice - SQL Script


This blog post is about one small best practice that can save lot of time in the long run if you are working with SQL Server Management Studio. 

Many people who involved in Dynamics NAV does not have a very close relationship with SQL Server Management Studio even though back-end of NAV is totally based on SQL DB. 

Even during that very little usage of SQL Server Management Studio, many people (including me) use wizards to do things because it's more easy and error free most of the time. 

Just like below, few clicks and we are almost there.. 

If we making backup (as an example) of same database for 10 times, then that mean we need to go through the same process over and over 10 times. 

Is there way we can do all those in one simple click? 

This blog post is about that. How about we create a small script in other word SQL Query which will do the same process for us. 

If you are not an expert in  SQL then you can use wizard to build your query. Do all the steps you usually do and then stop just before you press OK. 

Click on Script button and save it on a file or open in a new query window. 

If you open up in a new query window, your query will look like this and you can change the parameters as you want and just press execute. it will do the job for you.
Beauty of this method is that you do not have to go through wizard to get your task done, you can just do that with a click of a button. Think about time you going to save in long run. 

Other advantage is if you are doing a time consuming process then SQL Management Studio will show you the progress of your process in text format. 

I should give credit and thankful to SQL expert, my colleague Tomasz Szypilo who pushed me to use SQL scripts. 

Thank you for reading and hope you learned something from the blog post. 

Please provide your feedback with a comment. 
Thank you and Regards,
Tharanga Chandrasekara

Friday, February 3, 2017

Understanding COMMIT and transaction scope with temporary records within Microsoft Dynamics NAV

If you did not went through the previous post on "Understanding COMMIT and Transaction Scope within Microsoft Dynamics NAV",  I suggest you to go through it before start reading this blog post. 

What do you think about temporary records and transaction scopes?  

Most of developers think temporary records are managed as transactions, but it's not

Even if you call COMMIT within the code, it does not respect the effect of it. Also if error occurred during the process then, system will not rollback the changes. Any change made to temporary table will have to roll back manually (should handle through code). 

It is simple. Just keep in mind that use of temporary tables makes life easy, also it can worse things too if you do not handle them with care. 

Please provide your feedback with a comment. 
Thank you and Regards,
Tharanga Chandrasekara

Thursday, February 2, 2017

Use of Virtual Table : Date - Microsoft Dynamics NAV

This blog post is about something powerful but hidden within Microsoft Dynamics NAV. I believe many developers always work with dates over and over during their day-today life and i'm sure many of you have done many functions which convert, split and do all sort of things with date.

Saying that many developers does not know the virtual table "Date" in Dynamics NAV. In this blog post I am going to briefly explain about the different options you can have with the Date table.

As per the demonstrate purpose I quickly create a page (Source : Date Table) and open it. Table has 5 columns which are

  • Period Type 
  • Period Start Date 
  • Period End Date 
  • Period No. 
  • Period Name 
Period Type :
Period Type has 5 different options which are,

  1. Date 
  2. Week 
  3. Month 
  4. Quarter 
  5. Year 
Other four (04) columns have different use depending on the Period Type. Let me go through each Period Type and explain the use of other 4 columns.

I applied Date as a filter to "Period Type" column and check below page on how the data get filtered.

Period Start : Date which you have selected
Period End : Date which you have selected
Period No. : Integer value of the day within a week (1 - Monday, 2 - Tuesday)
Period Name : Name of the date which you have selected

In this level this make not much sense as this can be done quickly using small C/AL code.
Let's check on our next option.

I applied Week as a filter to "Period Type" column and check below page on how the data get filtered.

Period Start : Date which you have selected
Period End : Date which the week ends
Period No. : which No. of week of the year (First week of the year is 1 and then it gets increase per week.)
Period Name : Same information as Period No.

Let's check on our next option.

I applied Month as a filter to "Period Type" column and check below page on how the data get filtered.

Period Start : Date which you have selected
Period End : Date which the month ends
Period No. : Month in integer (1 - January, 2 - February) 
Period Name : Name of the month

I applied Quarter as a filter to "Period Type" column and check below page on how the data get filtered.

Period Start : Date which you have selected
Period End : Date which the quarter ends
Period No. : Quarter No. in integer 
Period Name : Name of the month

I applied Year as a filter to "Period Type" column and check below page on how the data get filtered.

Period Start : Date which you have selected
Period End : Date which the year ends
Period No. : Year
Period Name : Same information as 

Practical Use
Let's think you have a date and you want to know the start date of the week which your date falls in. You can do it by using different ways, but this is how quickly you can do that using Date record variable :

 Date.SETRANGE("Period Start",0D,YourDate);  
 Date.SETRANGE("Period Type",Date."Period Type"::Week);  
  PeriodStart := Date."Period Start";  

That is it, that is all the code you need to write in order to make it work. I will keep other options to your imagination and to your creativity.

Credit of this blog post goes to : Craig Barberini for bringing this back to my memory.

Please provide your feedback with a comment.
Thank you and Regards,
Tharanga Chandrasekara

Sunday, January 29, 2017

January 2017 Cumulative Updates for Microsoft Dynamics NAV

Note :

  • Due to a change in the CRM SDK implemented in December 2016, customers in multi-tenant NAV environments with CRM Integration enabled may find that CRM syncing is disabled or fails intermittently. 
  • Affected versions include NAV 2016 CU14, NAV 2016 CU 15, NAV 2017 CU1 and NAV 2017 CU2.
  • Any multi-tenant environments on an affected version using CRM integration should implement NAV 2016 CU 15.1 or NAV 2017 CU 2.1 as soon as possible as a precautionary measure.
  • Customers on Dynamics 365 for Financials do not need to take any action; this issue has been corrected in all available versions.
  • NAV 2016 CU 15.1 and NAV 2017 CU 2.1 will be released as soon as possible.
Please provide your feedback with a comment. 
Thank you and Regards,
Tharanga Chandrasekara

Integrate Dynamics NAV 2017 with Dynamics CRM Online

This blog post contain step wise guide on how to integrate Dynamics NAV 2017 with Dynamics CRM Online (Dynamics 365). 

If you like to create a temporary test CRM account, please follow below steps in the gif. 

Make a note of Dynamics CRM URL and user account details in a separate notepad. These details will required at the later stage of configuration. 
01. Once the CRM account is in place you need to import the Dynamics NAV integration solution to CRM. 
A.Import Solution
  • Step 01. In order to do that you need to go to Settings of CRM.
  • Step 02. Click on the "Solution" to open up the solution window of Dynamics CRM

B. Click on the import button to import the solution
  • Step 01. Click on the Import button on the Solution window to open up the import wizard
C. Select solution from the import solution wizard 
  • Step 01. Click on "Choose File" option and select the file. (Following is the folder path : NAV2017 Build 10.0.14199 CU 1 W1\New folder\CrmCustomization)
  • Step 02. Once the solution is selected click on Next

 D. Check on the solution details and confirm 
  • Step 01. If the solution details are correct click on Next

E.Check on import options
Step 01. If you want to enable anyh SDK messages proceswsing steps include in the solution then tick the check box. 
Step 02. Click on Import

F. Solution will start to import to Dynamic CRM. 

G. Check for any errors and if there is need to correct those.
Step 01. Click on Close after checking the details of imported solution. 

H. Imported solution will be list down in the All Solution view of the Dynamics CRM.

Once the solution import is complete in the Dynamics CRM, now we need to setup Dynamics NAV for integration. 
02. Setting up Dynamics NAV
A. In order to config Dynamics NAV you need to navigate to CRM Connection setup page. 
  • Step 01. Navigate to "Department -> Administration -> IT Administration -> Services -> Microsoft Dynamic CRM Connection Setup"

B. Option 01. Enter the details and test connection 
  • Step 01. Enter the Dynamics CRM URL which you noted down  in notepad after creating CRM instance. 
  • Step 02. Enter CRM login account Name
  • Step 03. Enter CRM login account password
  • Step 04. Click on "Test Connection" to test the connection details 

If the connection details are correct then it will show below message. 

B. Option 02.
If you are using the Dynamics NAV 2017 version you have an new option which will help to setup Dynamics CRM connector. This assisted setup is a wizard which will take you through all the main steps to complete the setup. 
  • Step 01. Click on "Assisted Setup" and go through the steps to complete setup.

C.Enable CRM Connection
  • Step 01. Click on Enable check box to enable CRM Connection
Once the connection is enable it will show scheduled jobs which liked with Dynamics CRM.

 D. Setup Dynamics NAV Web service URLs. If URLs are not setup by yet you need to manually add the URLs to setup or you can use "Reset Web Client URL" option available. 
  • Step 01. If URLs are not setup then Click on the "Resent Web Client URL" option. It will populate required URLs into the setup. 

Once the above steps is completed, CRM connection is almost done. (Using default configurations). If you required to change the synchronization data flow direction, tables, fields then it required additional steps. Which we will discuss in a later blog post. 

Wednesday, January 18, 2017

Dynamics NAV and Windows Server 2016

Windows Server 2016 released in October 2016 with many new and interesting capabilities. For more information, see their announcement here:

Over the last few months, the Dynamics NAV team has been testing compatibility with this new version of Windows Server, and we are now proud to announce that
  • Microsoft Dynamics NAV 2017,
  • Microsoft Dynamics NAV 2016,
  • Microsoft Dynamics NAV 2015,
  • Microsoft Dynamics NAV 2013 R2, and
  • Microsoft Dynamics NAV 2013
are compatible with Windows Server 2016. This applies to the following editions of Windows Server:
  • Standard Edition
  • Essentials Edition
  • Datacenter Edition
The blog post was updated on 11. January 2016 to also mention Datacenter Edition.

Please provide your feedback with a comment. 
Thank you and Regards,
Tharanga Chandrasekara

Sunday, January 1, 2017

Awarded as Microsoft MVP - 2017

What a great way to start the new year!

Second consecutive year as a Microsoft Most Valuable Professional.

It is a great honor to receive the most prestigious award a person who works with Microsoft technologies can receive. The Microsoft Most Valuable Professional (MVP) award.

I want to thank all the people who helped me to achieve this dream. Thank you very much for all of my blog readers and specially to the people who given me the feedback on each and every post that I have posted on my blog. Those valuable feedback helped to become the person who I am today and it was really a privilege to be the part of the community and help you all. 

As I always believe, best way of learning is sharing the knowledge and helping each other. It allows us to see things differently and gain so much of knowledge we have never even able to get reading all the books around us. 

Most of you have reached me via my E-Mail or through Dynamics NAV Community Forum and I will try my best to keep in touch with you all. Sorry if I have miss any of your e-mails, requests, SMS, feedback. (Please do buzz me all the time if I did miss to reply).

Finally I want to congratulate all fellow MVP's whose status is renewed or got selected for the first time just like me. 

I have long way to go and hope everyone will be with me till the end.. 

Please provide your feedback with a comment. 
Thank you and Regards,
Tharanga Chandrasekara

Wishing You All a Happy New Year!

It's 2017 already and I wish you and all your loved once a perfect year ahead. 

Year 2016 is one of the best year for me due to many reasons. Specially it is the first year I got the MVP award from Microsoft for Dynamics NAV and it allows me to become the first Dynamics NAV MVP in Sri Lanka. It is a dream come true. 

During the 2016 year I have published around 80 blog posts and participate in the Microsoft Dynamics NAV Community forum actively. I have answered around 800 questions and moderate the forum actively. I believe my activities were helpful to the users all around the world. 

I have actively participated in some of the major conferences in South Asia region and spoke in many Dynamics NAV user groups about new technologies related to Dynamics NAV. 

I manage to introduce "Dynamics NAV Cloud (Azure) Hosted Solution (SAAS)" to Sri Lankan Dynamics NAV community during "Azure Roadshow 2016 | Global Azure Bootcamp" and it was a huge success. 

In the year 2017 I would put more focus on Dynamics NAV Extensions and in order to reach more audience I will be creating more Youtube videos in my Youtube channel. I am planning to visit selected Dynamics NAV conferences in USA and Europe in year 2017 so that I can share more information with my readers. 

Lets make 2017 a great year! Once again I wish you and all your loved once a perfect year ahead

Please provide your feedback with a comment. 
Thank you and Regards,
Tharanga Chandrasekara

Saturday, December 24, 2016

Preview of Dynamics NAV Development Tools - How to get Started

I think most of you know by now already that Microsoft has released new Development preview for Dynamics NAV. If you still not updated on that yet, then refer below link on the Preview of Development Tools for Dynamics NAV

In this blog post we are going to talk about how to get start with new development tools. Currently all these tools are available in a Azure VM. Therefore we required to create a new VM in Azure. Microsoft has already created a deployment template for you and all you need to do is fill the blanks in the template. 

Once that is done it will automatically deploy the VM for you. So lets get started.. 

Step 01 : Create Azure Subscription 
If you does not have a Azure account then you can try the free account. To create a new free subscription refer below link :

Step 02 : Deploy Azure VM
Click on below link, which will take you to custom development template in Azure. While doing that it might ask you to login to your Azure Subscription.

When the Deployment complete give it 10-15 min more until the Virtual Machine is initialized and VS Code has been installed and configured for you.

Step 03 : Connect to Virtual Machine
Select the Virtual Machine (Server1) like below and in next screen click on "Connect". Which will download the "Remote Desktop Connection"

Enter the "vmadmin" password to connect to Virtual Machine. 

Once you connect to Virtual Machine you can see the below Desktop Icons which will allow you to open Web Client of Dynamics NAV and Visual Studio Code. 

Stay tune for next blog post on how to use Visual Studio Code to develop extensions for Dynamics NAV and how to use Web Client to rearrange pages.  

Please provide your feedback with a comment. 
Thank you and Regards,
Tharanga Chandrasekara

Tuesday, December 20, 2016

Preview of Development Tools for Dynamics NAV

Microsoft has deiced to give an early Christmas gifts to the world by introducing new tools to build extensions and apps in and for Dynamics NAV

Tool comes in two flavors and both are available in preview from today (21/12/2016).

The in-client designer
Before talking about it, just have a look at the below gif. I'm sure most of you will love the idea. No need to go back to developers to add a new field to a page. It is all can be done in the client window itself. 

This will allows to drag and drop interface, rearrange fields, rename-groups and reposition element to build perfect extension to support an industry-specific solution or implement a business process optimization.

Visual Studio Code
Use the AL Extension for NAV in Visual Studio Code to build powerful extensions based on tables, pages, and codeunits using the new objects: Page Extensions and Table Extensions. 

If you need to know how to start on using these great tools click here to access Microsoft official announcement.

The official short URL is :

This looks so promising already and we are still at the preview.. 

Please provide your feedback with a comment. 
Thank you and Regards,
Tharanga Chandrasekara