Hi I am new at NAV and i have trouble to import data using dataport to NAV
I have data in csv file formated like this.
Name Address City Phone
Mike Adress1 City1 00000
Luke Adress2 City2 111111
Paul Adress3 citiy 44444
1. I am using code like this
Contact.INIT;
Contact."No.":=NoSeriesManagement.GetNextNo ('Contact', TODAY, TRUE);
Contact.VALIDATE(Contact.Name,Name);
Contact.VALIDATE(Contact.City,City);
Contact.VALIDATE(Contact.Address,Address );
Contact.VALIDATE(Contact.Address,Phone);
Contact.INSERT;
I insert NO. like ID that is generate and that is saved in table Contact but others filed Name,Address,City,Phone(these are global variables) are not insered in table from csv file.
File format is set as variable
And filed seperator is set as ;
0
Answers
I can't see your field Seperator in this line ...
What is your dataItem ?
My mistake was that did not use same name in datafield and global variables.
I defined Name in global variable as Nm and in datafiled i use Name and it did not use data from csv file to my global variables