Monday, November 14, 2016

Difference B/W Pass By Reference & Pass By Value (Miracle Solved & Explained For all Languages)

Functions are created in all languages and perform various tasks uniquely. 

That's the reason why functions are useful in a coding of all types Languages.

Creating a Function needs to be needs needs 3 Basic Steps :


1. Defining and Creating the Defination of Function.

2.Calling the Function.

3. Passing the Paraments and Arguments into the function so that it provide output.

Now, 
as navision is using C/AL Language in its heart to define and work the logics.There is only one thing common is Function.

Calling the Function and creating the Function and Defining the Function.


Due to this Fact , understanding Functions is very much necessary for beginners and experts of NAV TECHNICAL Consultants.

Functions are easy to create in NAV. Now passing the parameters and calling the functions is explained below.

There are two functions which I had created and Called it via 

CALL BY REFERENCE & CALL BY VALUE.





By Default All Variables in Functions inside NAV Dev are Pass by Value which means a copy is created for parameter and passed.

Variables Used:
CustRec     Record    18
Old Name   Text 50
New Name  Text 50
ChangeCustomerName and ChangeCustomerNameRef are two functions Created in which
Customer variable is taken First one is Pass By Value and Second one is Pass By Reference.


The Code is As Follows :


(This code is only for study purpose taken as Example.If any Objections then Kindly mail)



The Final Result is as under screenshot.

Result 1:-


Result 2:




Tuesday, September 27, 2016

How to separate comma separated value in NAV and import the values in table MS Dynamics Navision?

Comma , Separated Value Retrieval

Now a days, we are moving to more around e commerce industry which works in 24*7 format so to ease the performance and manual work we prefer to use web services. These web services include a set of format which includes some logical values. So in this blog we will try to extract some values from a returned web services.

What we are going to use?

There is a function in NAV called SELECTSTR .

Acc. to msdn,
SELECTSTR treats string values as OPTIONS. This means that identical values in different strings are not allowed.
Any trailing commas are removed before the operation begins.
If Number is less than 1 or greater than the number of real values (excluding trailing commas) in the string, then an error is returned.
Quotes are not supported. For example, a,b,"c,d",e is treated as a five-element substring where substring 4 is d".

Example:-

We are going to retrieve 

1.Account Type
2.Url
3.ID
4.Name
from this returned value from web service.

{"type":"Account","url":"/services/data/v32.0/sobjects/Account/001N000000pEFqVIAW"},"Id":"001N000000pEFqVIAW","Name":"aafag"} 

How to implement the customization and store it in the Table.

Declare variables as per need and requirement.

This is the code which I had written for select the string and then simply insert it into our table.



The final result is here.



You can download the objects by:


Monday, September 26, 2016

How to create a PROGRESS Bar in Navision ?

To create a progress bar for a long process in NAV .

We will create 4 variables for calculation and creation of progress bar in navision. These four variable are of type Dialog and Integer.


To create a demo progress bar we will just give AmtToProcess  a value of 500000.We are using a ROUND function for this scenario.And UPDATE function which will 

Update the progress bar for few seconds.




The final result will be like this one.



I hope this code will help you to create progress bar in navision.
And you can more customize the progress bar according to your need.