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.