Tuesday, January 27, 2015

Managing your Microsoft Dynamics NAV implementation with PowerShell

​Please find on this page series of How Do I series on Microsoft Dynamics NAV PowerShell.

The How Do I video provides an introduction to using the Windows PowerShell tools, and gives a basic tour of the cmdlets that are provided with Microsoft Dynamics NAV 2013 R2.
The How Do I video walks you through how to create a script, using as an example one that execute a codeunit in all companies in all tenants.
The video illustrates how to migrate from Multiple Companies to a Multi-tenant Architecture in Microsoft Dynamics NAV 2013 R2.
The How Do I video shows how to do a backup and restore in a multitenant environment.
The How Do I video shows how to manage multiple companies in Microsoft Dynamics NAV.
How Do I: Setup Web Client, Windows Client, NAS and Web Services on separate service tiers in NAV 2013 R2
The How Do I video shows how to setup Web Client, Windows Client, NAS and Web Services on separate service tiers in Microsoft Dynamics NAV 2013 R2.
The How Do I video shows how to use Windows PowerShell cmdlets to manage users and permission sets for Microsoft Dynamics NAV 2013 R2.
The How Do I video demonstrates how to manage tenants in Microsoft Dynamics NAV 2013 R2.


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

Sunday, January 25, 2015

Cumulative Update 3 for Microsoft Dynamics NAV 2015 has been released

Cumulative Update 3 includes all application and platform hotfixes and regulatory features that have been released for Microsoft Dynamics NAV 2015.

The cumulative update includes hotfixes that apply to all countries and hotfixes specific to the following local versions:
  • AU - Australia
  • AT - Austria
  • BE - Belgium
  • CH – Switzerland
  • DE - Germany
  • DK - Denmark
  • ES - Spain
  • FI - Finland
  • FR - France
  • IS - Iceland
  • IT - Italy
  • NA - North America
  • NL - Netherlands
  • NO - Norway
  • NZ - New Zealand
  • RU – Russia
  • SE - Sweden
  • UK - United Kingdom
Where to find Cumulative Update 3

You can download the cumulative update from KB 3024901 – Cumulative Update 3 for Microsoft Dynamics NAV 2015 (Build 39368).
Additional Information

For information about how to install the cumulative update, see How to Install a Microsoft Dynamics NAV 2015 Cumulative Update.

For information about how to work around a recent process change, see How to Get Back the 'Hotfix Directories' from NAV 2015 Cumulative Update 1.

For a list of all cumulative updates for this version, see Released Cumulative Updates for Microsoft Dynamics NAV 2015.

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

Cumulative Update 15 for Microsoft Dynamics NAV 2013 R2 has been released

Cumulative Update 15 includes all application and platform hotfixes and regulatory features that have been released for Microsoft Dynamics NAV 2013 R2.

The cumulative update includes hotfixes that apply to all countries and hotfixes specific to the following local versions:
  • AU - Australia
  • AT - Austria
  • BE - Belgium
  • CH – Switzerland
  • CZ – Czech Republic
  • DE - Germany
  • DK - Denmark
  • ES - Spain
  • FI - Finland
  • FR - France
  • IS - Iceland
  • IT - Italy
  • NA - North America
  • NL - Netherlands
  • NO - Norway
  • NZ - New Zealand
  • RU – Russia
  • SE - Sweden
  • UK - United Kingdom
Where to find Cumulative Update 15

You can download the cumulative update from KB 3024898 – Cumulative Update 15 for Microsoft Dynamics NAV 2013 R2 (Build 39354). 

Additional Information

For more information about cumulative updates for this version, see Announcement of update rollups for Microsoft Dynamics NAV 2013 R2.

For a list of all cumulative updates for this version, see Released Cumulative Updates for Microsoft Dynamics NAV 2013 R2.

For a list of all hotfixes included in cumulative updates for this version, see the following CustomerSource and PartnerSource pages:

CustomerSource:
Overview of Released Application Hotfixes for Microsoft Dynamics NAV 2013 R2
Overview of Released Platform Hotfixes for Microsoft Dynamics NAV 2013 R2

PartnerSource
Overview of Released Application Hotfixes for Microsoft Dynamics NAV 2013 R2
Overview of Released Platform Hotfixes for Microsoft Dynamics NAV 2013 R2

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

Cumulative Update 22 for Microsoft Dynamics NAV 2013 has been released

Cumulative Update 22 includes all application and platform hotfixes and regulatory features that have been released for Microsoft Dynamics NAV 2013.

The cumulative update includes hotfixes that apply to all countries and hotfixes specific to the following local versions:

  • AU - Australia
  • AT - Austria
  • BE - Belgium
  • CH - Switzerland
  • DE - Germany
  • DK - Denmark
  • ES - Spain
  • FI - Finland
  • FR - France
  • IS - Iceland
  • IT - Italy
  • NA - North America
  • NL - Netherlands
  • NO - Norway
  • NZ - New Zealand
  • SE - Sweden
  • UK - United Kingdom
Where to find Cumulative Update 22
You can download the cumulative update from KB 3024895 - Cumulative Update 22 for Microsoft Dynamics NAV 2013 (Build 39369).


Additional Information

For a list of all cumulative updates for this version, see Released Cumulative Updates for Microsoft Dynamics NAV 2013.

For a list of all hotfixes included in cumulative updates for this version, see the following CustomerSource and PartnerSource pages:

CustomerSource:
Overview of Released Application Hotfixes for Microsoft Dynamics NAV 2013
Overview of Released Platform Hotfixes for Microsoft Dynamics NAV 2013

PartnerSource:
Overview of Released Application Hotfixes for Microsoft Dynamics NAV 2013
Overview of Released Platform Hotfixes for Microsoft Dynamics NAV 2013


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

Friday, January 23, 2015

Microsoft HoloLens - Transform your world with holograms

This is not related to NAV! But this is fascinating! Microsoft picking up from where Google glass failed.

This is just amazing! 



For the first time ever, Microsoft HoloLens seamlessly blends high-definition holograms with your real world. Holograms will improve the way you do things every day, and enable you to do things you've never done before.
Get more details from here and from here too

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

Number is missing in the Posted Sales Invoice list

Recently in the Microsoft Dynamics NAV forum we had a question related to missing number in the posted sales invoice list and I thought to write a small blog post about this.

May be, May be you have faced this scenario in Microsoft Dynamics NAV.
 
Scenario is that Microsoft Dynamics NAV Sales Invoices are setup with a posting No. series and after a while when you check the posted sales invoice list you do realize few numbers are missing.  
Many of think that the posted invoice was deleted by someone and then start to look into who deleted it and why! Before jumping into a such a conclusion I think you need to find out the real case scenario

In Microsoft Dynamics NAV, Posting number (Posting No.) is assign to a invoice at the time posting. So the user is perfectly correct! Posted sales invoice list should have the proper number order and it should not have any missing numbers.

However there are few cases this can be happen in Microsoft Dynamics NAV.

1. User with the authentication have deleted the invoice. 
In this case you can check the log of the Microsoft Dynamics NAV can find the person who is responsible of deleting. 

2. Document is still to post. 
This is a very common scenario in NAV. 
Assume you have 3 sales invoices and you want to post them all. So you post your first invoice and it got the number INV-000-01 as the posting sales invoice number. After posting the first invoice successfully, you try to post your second invoice and according to the standards it should get the INV-000-02 as the posting number. BUT! due to some error in the sales invoice data NAV throws and error and rollback the posting process. 

Ok! Without correcting the error you move to third invoice and post it and it get posted without any problem. (happy face)

All is done (except for the second invoice). So you navigate to posted sales invoice list and check the posted invoice list. (Finance Management/Receivable/History).

In the posted invoice list you will find INV-000-01 and INV-000-03 as the posted innvoices. How did that happen?? You only posted 2 invoices and what happen to that INV-000-02 invoice??

Very simple. 
When you EVEN try to post a invoice in Microsoft Dyamics NAV, System will assign a posting number to the invoice. In this case system will assign INV-000-02 to your second invoice and even though it did not get posted at the first time, system still keep a number open for this sales invoice. 

So what will happen to INV-000-02? 
Nothing to worry about. When you correct the error in sales invoice and post it, It will post as the INV-000-02 and you will not find any sequence error in your posting number order.

Nothing to worry?
There is a small worry with this method. Without correcting the error in the invoice and when you deleted the sales invoice then your posted sales invoice list will not have the INV-000-02 as a posted sales invoice because with the sales invoice deleted, your posting number INV-000-02 is get delete too. As long as you posted the invoice you and your number series is safe. :) 

3. Sales invoice is deleted and did't knew it will affect the posting number also. 
Another common scenario to happen in Microsoft Dynamics NAV.
In this case posting number series and sales invoice number series are both the same. 

That means in the sales and receivable setup you have set the same number series for invoice and posted invoices. 

In this Sales & Receivable setup I have set the ABC number series as the Invoice number series as well as the posted invoice number series. So when ever I create a sales invoice it will take a number from the ABC number series and then post it to posted sales invoice list. (will not assign a new number to posted sales invoice).

So the risk here is that, think if you create a invoice and then you delete it. It will simply skip that number and you will not get that number in the posted sales invoice list. 

Those were the main case scenarios that could affect your posting number order. (Apart from intentionally changing the number).

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

Wednesday, January 21, 2015

Copy Company function in Dynamics NAV 2013 R2 onwards.

Copy company is not a new function for the users who have been using NAV for a long time, however I felt I need to write a blog post about it. 

In Microsoft Dynamics NAV if the user want to test transactions before enter them and post them in the live environment then this functionality will be very useful because it will allow the users duplicate the live environment and create a new company.

Copy company is a new functionality introduced by Microsoft in the 2013 R2 version, since the 2013 R2 version Microsoft removed the functionality of taking the .FBK from the application itself. So users didn't had a easy way of making a test company without using powershell commands. 

In the earlier versions user had the option of talking a backup from the application itself and then rename the original company to a different name and then restore as a new company, unfortunately Microsoft has removed that functionality and given that functionality to powershell commands.

Using following few steps users can create a separate test company which has the same data as the live company. 

1. Go to Departments -> Administration -> IT Adminstration -> General -> Companies
(If you are using the search function make sure you click on the "Companies". Not the "Company"

I have only one company in the test environment and I want to duplicate this Cronus company. 

2. Select the company you want to duplicate. 
3. Click on the Copy button in the menu bar. 

4. Enter the name of your new company. In this case I will enter the name as "Test Company" and click OK. 

5. It will take few seconds - minutes depending on the amount of data company contains. 

My new company is available in the list and, now I can do all the testing in this newly created company. 


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

Tuesday, January 20, 2015

How to set/change the default sorting order of a page in Microsoft Dynamics NAV

Over the past few weeks I noticed there were several forum queries regarding how to sort a page with a different key. So thought to write a small blog post about how to do.

As the example I would take customer ledger entry page in Microsoft Dynamics NAV 2015. As you see in default system set the "Entry No." as the default sorting key. 

How system works and how did system identify the default sorting key. 
In Microsoft Dynamics NAV developer can set the sorting key in the page itself. If the sorting key is not set in the page level then system set the page sorting order depending on the primary key of the table. 

Why to set a default sorting key when user can set the sort order by clicking the header the column (Caption). 

Yes, It is true that user can set the sorting order by himself, but it is a manual process and every time user open the page he/she should be click on a column to set the sort key. So why not set a default sort key, because it save the time, and computer resource. 

Let's start with the tutorial. 


In this case I want to set Customer Ledger Entry page default sorting key as Posting Date. 

In order to perform this I want to have a active key in the source table. In this case my source table is Cust. Ledger Entry table. 

So I design my Cust. Ledger Entry table in the development environment. 


Then go to Tools -> Keys
It will open a window like below, and in the last line I add my new key, which is the Posting Date. 

After adding the key to the table I saved and compiled my Cust. Ledger Entry table. 

We are done with the table modification and now we have to set the key to the page. In order to do that I have to open the Customer Ledger Entries page in the development environment. 

Below how it look like once you open the page in the design view, Click on the first empty line of the page design view. 

Then click on the properties icon in the top toolbar. By doing that system will open a properties window of the page. 
Remember this is where many of the new developers make the mistake. In order to get the page properties you need to click on a empty line and then click on the properties. 
If you click on any other row and then click properties will open the properties of that particular row. 

Once you click on the Page property following screen will open. First check the Name field in the list. It should be as the page Name and if the name field has a different name than the page name, that means you must have opened a property of a field. 

In the following page as you can see source table is set as the Cust. Ledger Entry and Source Table View is empty. That means system will get the sort key from the source table. In this case Entry No. 
So we want to change it to Posting Date. 
To do that click on the drilldown button in the SourceTableVeiw.

Once you click on the SourceTableVeiw  drilldown system will open up the following window where you will be able to set your key for the page. 

As the window below set the key and set the order you want to have. 
When you click on this it will show all the active keys for the page and you have to select your key. In this case I will select Posting Date as my key.  

Once you click on the OK button, window will get closed and SourceTableVIew field will be filed with the key and the order you sorted in the previous window. 
Esc. from the properties window and then compile and save the page. 

We are ready to go. To check the modification, open the page in RTC and as you can see default sorting is set to the Posting Date. 

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

Sunday, January 18, 2015

Microsoft has released programming guidelines for C/AL programmers to follow

Microsoft has released programming guidelines for C/AL programmers to follow. 

Why to follow guideline : It is not a must to follow these guidelines but it will definitely help other and the original programmer to understand the code in a later stage, Addition to that once the code is optimized program will run smoothly and even if there is a programming error it will be easy to debug the code. 





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

Tuesday, January 6, 2015

Either the caller does not have the required permission or the specified path is read-only - Microsoft Dynamics NAV

Once we complete the installation of Microsoft SQL and Microsoft Dynamics NAV all we want to have a smooth start up of the application and see the homepage of the Microsoft Dynamics NAV. How many of us get that satisfaction ? I am pretty sure most of the people get the smooth startup of Microsoft Dynamics NAV. 
But for unfortunately some people get the following error during the start of RoleTailored Client (RTC),


And it says,
"Either the caller does not have the required permission or the specified path is read-only"

So what is the reason and fix for this problem? 

Reason : Reason for this error is that user does not have the sufficient rights on the service tier of Microsoft Dynamics NAV.

Fix : In order to provide the access to service tier you need to give the necessary user rights to the service folder in the Server. 

How to fix: 
In order to provide the access please following below steps :
1. Go to Service folder in the Server. 
2. Right click on the Service Folder and go to properties of the folder. 
3. Go to Security Tab of the Properties 
4. Click Edit in the Security Tab
5. Check the users are in under the "Group or user names" section. 
6. If not available click add button and add the relevant users
7. If users are already exists then check the permission of the users
8. After assigning the permission to users click Ok.
9. As the final step restart 

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

Thursday, January 1, 2015

Function definition error in Dynamics NAV

This is a small issue I recently identified in Microsoft Dynamics NAV. 

Last week I developed a function to do some email formatting and it compiled without any problem. Everything went very smooth without any issue until I call the developed function with the required parameters. 
Once I compile the codeunit which has the function call this error popped up. 

My first impression was I have missed the required parameters and I checked it. So my function definition and my function call has same number of parameters so I was confused about this message.   

To demonstrate this issue I have created a very small function which take 2 decimal values in and then return the sum of it. 

This is how my function definition would look like in the C/AL editor.

This definition means SumValue function take No01, and No02 as input parameters and as the output it return the TotalSum variable. 
Nothing fishy.. 

As a next step I will call this function from the OnRun trigger of the codeunit. 

So this is perfect, Isn't it? 
Function definition required 2 parameters and I am passing 2. So everything should be ok and this should get compiled without any error. 

So here we go.. 

I get the same error when I try to compile and Save the codeunit. It cannot be a problem with my function call because I am providing all the required parametersThen what is the problem with this tiny little function which take 2 values in and return the sum of it?

To see the problem go to the function declaration window. 


There is a integer type parameter without a name and this is not visible in the function definition line of the C/AL editor.  

Once I delete the empty line code get compile without a problem. 
These are very small things which will create headache to programmers.  


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