Import data using dataport

snessnes Member Posts: 3
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 ;

Best Answer

Answers

  • Wisa123Wisa123 Member Posts: 308
    Mike Adress1 City1 00000

    I can't see your field Seperator in this line ...
    What is your dataItem ?
    Austrian NAV/BC Dev
Sign In or Register to comment.