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".


We are going to retrieve 

1.Account Type
from this returned value from web service.


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: