Friday, May 11, 2018

How to create New Nav Company using powershell?

Hi All,

Today I got one situation where we need to create a new NAV database from database itself and add the FOB and when we try to open it.

NAV will give us the ERROR 'No Company is found' or something like that.

So I interacted with powershell and sharing the basic steps to create Company in powershell if my nav developers get stuck in between.

SO lets start with powershell.

Step 1.

Open MS DYNAMICS NAV 2018 Administration Shell with Administrator Mode (Very important)

Import the Module using this command.

Import-Module "${env:ProgramFiles}\Microsoft Dynamics NAV\80\Service\NavAdminTool.ps1"

Step 2 .

Once it is imported Follow below screenshot :

It will take a while , if instance is running and everything works fine you can proceed with running your new company in RTC.

How to call stored procedure from MS Dynamics NAV 2018 using Automation Variable?

Automation Variable in NAV 2018

Frankly this is my first interaction with automation variable in my project. So I want to share with NAV community how can we connect our SQL Database and interact with stored procedures to process NAV database.

Step 1. Take the below variables.

Name                  DataType                          Subtype

lADOConnection Automation 'Microsoft ActiveX Data Objects 2.8 Library'.Connection
lADOCommand Automation 'Microsoft ActiveX Data Objects 2.8 Library'.Command
lADOParameter Automation 'Microsoft ActiveX Data Objects 2.8 Library'.Parameter
lvarActiveConnection Variant

Step 2. Write the below code :-



//lADOConnection.ConnectionString := 'Driver={SQL Server};Server=Server Address;Database=Database NAme;Uid=sa;Pwd=Password;

Check with other users also but provide some admin rights on SQL.


  lvarActiveConnection := lADOConnection;
  lADOCommand.ActiveConnection := lvarActiveConnection; 

  lADOCommand.CommandText := 'Stored Procedure Name';

  lADOCommand.CommandType := 4;
  lADOCommand.CommandTimeout := 0; 



 MESSAGE('Done Successfully');

So NAV Readers just try this code if you face any issue , comment below. Also for some usage bookmark this page.

Monday, May 7, 2018

Microsoft Dynamics 365 Apps Foundation

Dynamics 365 Apps For MS Dynamics NAV

Dynamics 365 is a online solution for end users with facilities of CRM and ERP. For NAV

 Developers how its going to impact is the one point of disscussion which we were disscussing in our

 Germany Office. So few things I liked that you can get from my this blog area.

This will clear all your understanding about Microsoft Dynamics 365.

Step 1.

Microsoft Dynamics 365 for Sales (popularly known as Dynamics CRM).

Step 2.

Microsoft Dynamics 365 for Field Service(popularly known as Dynamics CRM)

Step 3.

Microsoft Dynamics 365 for Project Service Automation (popularly known as Dynamics CRM)

Step 4.

Microsoft Dynamics 365 for Finance and Operations, Enterprise edition (popularly known as Dynamics AX)

Step 5.

Microsoft Dynamics 365 for Finance and Operations, Business edition (also known as Project Madeira and based on popularly known Dynamics NAV)

Step 6.

Microsoft Dynamics 365 for Talent

Step 7.

Microsoft Dynamics 365 for Retail

Step 8.

Microsoft Dynamics 365 for Marketing

Step 9.

Microsoft Dynamics 365 for Marketing

Step 10.

Microsoft Dynamics 365 for Customer insights

Saturday, April 21, 2018

How to connect with Modern Development Environment in MS Dynamics NAV 2018?

Finally I did it , Connection with modern development !!!

As we all know change is the law of nature everybody is looking at microsoft what they want to do with Dynamics NAV.

Now the new name is Dynamics NAV 365 Business Central and what we developers are sure of that all development will be changed to new modern Visual Studio Code.

Also Dynamics NAV 2018 R2 is going to release in October 2018 so this might be the last version of Dynamics NAV for Indian Version with old memories. Hahaha.😼😼😼😼

So coming to the point :-

How to connect with modern development environment with Dynamics NAV 2018?

Step 1. Understanding what is this ?

This is a extension provide by microsoft with there setup in ModernDev folder. With this extension we can easily customise our standard product without changing the base code of microsoft.

Step 2. Where we can find this extension in product setup.

CU 03 NAV 2018 W1\NAV.11.0.20783.W1.DVD\ModernDev\program files\Microsoft Dynamics NAV\110\Modern Development Environment

Step 3 : How to install this extension ?

      1. Setup your NAS Server to call Modern Dev Environment.

         Web Service URL and as shown in Development Tab must be same as mines.

  1. Open Visual Studio Code if dont have it download it from here.Download
  2. Go to extension.
  3. Click as shown to see Install from VSIX 
  4. Select the Modern Dev Environment Extension from the above path. 
  5. After installation it will ask for Reload click yes. This should be shown like me. 
  6. Now press Alt + A and Alt + K. It will ask you to setup File folder of default project. You can just press Enter and your Launch.Json file will open. If it does not works then click here and check this Link.

7. When All this things are done Press Ctrl + F5. You should get the final result like this.

I have followed this step and Extension is ready for me.

My next blog will showcase our first extension to be created in MS Dynamics NAV.

I hope with this blog dvelopers will be able to implement Visual Studio Extension completely.

Tuesday, April 17, 2018

Dynamics NAV 2018 Cumulative Update 03 is Available

Nav 2018 CU3

Hi All ,

You can download your latest updated CU3 for NAV 2018 from this below link :

Cumulative update installation and other pre requisites are also available on the web page.

This cumulative update is available in below regions :

Download Summary:
1.CU 03 NAV 2018
2.CU 03 NAV 2018
3.CU 03 NAV 2018
4.CU 03 NAV 2018
5.CU 03 NAV 2018
6.CU 03 NAV 2018
7.CU 03 NAV 2018
8.CU 03 NAV 2018
9.CU 03 NAV 2018
10.CU 03 NAV 2018
11.CU 03 NAV 2018
12.CU 03 NAV 2018
13.CU 03 NAV 2018
14.CU 03 NAV 2018
15.CU 03 NAV 2018
16.CU 03 NAV 2018
17.CU 03 NAV 2018
18.CU 03 NAV 2018
19.CU 03 NAV 2018
20.CU 03 NAV 2018

Monday, March 12, 2018

Nav Purchase Transaction Impact on Chart of Account

Purchase Cycle :

When a Item is purchased in MS Dynamics NAV using purchase order and purchase invoice some accounts are credited and other accounts are debited. So for functional side we must know what is the major impact. Let's see the impact in detail.

Step 1. Create an Item.

Choose any of the default Item Template to complete the Item Setup.

Step 2. Create Purchase Quote and click on Create Order.

Once this is done your quote will be converted to Order and we are receiving the order and now we will check what is the impact of receiving on accounting level.

+ in NAV means Debit and - means Credit for accounting purpose only.

For Inventory concept of sign is same.

Step 3 : When we receive a PO there is no impact on Accounting Side.

Step 4 : Lets post the Receipt using purchase Invoice Page.

When we post the invoice we get this final result.

In this final result we will check the COA in GL Entry which Account is debited and which account is credited.

1.G/L Entry :

Vendor Account Credited by 750


Purch. Payable Account is debited by 600 and VAT 150

What is the impact of payment for vendor invoice on G/L Account?

Now, vendor account is debited 
5410 is debited by 750
5310 Liability Account is credited by 750.

Sunday, March 11, 2018

Tutorial 20 What is Exception Handling in Dotnet ?

What is Exception Handling ?

Exception handling is very important in dotnet because this is a coding structure based on variables 

and basic programming structure.

Here , Dotnet framework is providing us a method to check unwanted  errors from our development and coding.

We are implementing it using 3 blocks of code :

1. try :

This block is used to complete the task.

2. catch (exception ex)

This block carries the exception and here we can also catch any  exception occurring in the code.

3. finally

This block is the final code to be executed when certain error occurs in our code structure.

What is inner class exception in Dotnet and how we handle the same?

Whenever there is an exception which depend on another exception it is termed as inner exception handling.

For Example : 

Exception 1 : We want to write the exception in a log file and send it to client.

Exception 2 : We want to divide by Zero some integer value.

So in this scenario we need to implement the solution using inner class exception. To use this exception we will use a constructor of exception class.

Can we create our own Exception class and how?

Yes we can easily create exception class defined by us and add our own exception which we cant get 

in standard dotnet framework class. We will achieve this using Inheritance concept which is 

inheriting from dotnet exception class.

What is abusing in exception handling?

Abusing exception handling means for one program you need to write multiple catch blocks.
see for example.

Tutorial 19 What is multicast Delegate in Dotnet?

 What is Multicast ?

Multi Casting means when a variable is pointing to one or more functions.

Multi Casting in Delegates means when one delegate instanced variable is pointing to one or more functions.

In this example of multi casting delegates we need to follow these steps :

Step 1 : Define Delegate as done in point 1.

Step 2 : Define Variables of Delegate.

Step 3 : Creating Instances of Delegate and also we can add the instance of variable.

Step 4 : Define Methods of instances.

Tutorial 18 What are delegates ?

What are Delegates ?

Delegate is type safe function pointer. Means the return type of method must be similar to signature of Delegate.

What is the use Delegates in C Sharp?

Just check this and get the concept of programming without delegate in dotnet.

Now we will see the implementation of method PromotedEmployee using delegate.

There are 3 steps in delegate implementation.

A delegate is a type that represents references to methods with a particular parameter list and return type. When you instantiate a delegate, you can associate its instance with any method with a compatible signature and return type. You can invoke (or call) the method through the delegate instance.

Delegates are used to pass methods as arguments to other methods. Event handlers are nothing more than methods that are invoked through delegates. You create a custom method, and a class such as a windows control can call your method when a certain event occurs.

How to implement alternative way of Delegate using Lambda Expression ?

Lambda Expression :
1. it means  => such as 
and this is called expression >= 

Friday, March 9, 2018

Tutorial 17 What are difference between abstract classes and interfaces ?

Abstract Classes and Interfaces :

Notes :

1. Abstract classes can contain definition of methods but interface cannot have definition for any method.

2. Abstract classes can contain variables but interfaces are only meant for method declaration.

3. Interface can only inherit from interface but abstract class can inherit from interface and abstract class also.

4. A class can inherit from multiple interfaces but cant inherit from multiple class at same time.

5. Abstract classes method definition can have access modifiers whereas its not possible for interfaces.

What is Diamond Problem in Dotnet ?

This is a problem in Dotnet for multiple inheritance when we try to inherit from derived class and the function with same same is present in parent class also and the compiler is unable to identify from which class implementation is to be done.

What is the use of  interface ?

Using Interface we can achieve multi level inheritance in dotnet. Lets see with one example.