XMLPORT import error

Hello All,

My requirement is to import Purchase Lines.

What I did is, on PO page I gave two buttons(on push XMLPORT are running) one for export and other for import the data.

Purchase Header will be available, so when I run POXMLExport following csv file is generating with PO No and headers only(Line No is removed from file).

pastedimage1551162290294v2.png

then user will edit file, for Item No, Loc Code and Qty and will import by button PurchLineImport.

Export xmlport working fine but when I am trying to edited csv file I am getting following error.

Import xmlport design is as below

can someone tell me where and what mistake I am doing. using NAV 2017.

Thanks in advance.

Purchase Order with number (104001 in this case) has to be present in purchase header before it can be used in purchase lines

Thanks for reply Imran.

Issue was with sequense of fields taken in xmlport. DocType should be prior to Doc No.

Its importing now.

definitely document type is prior to document no. :slight_smile:

sorry i didnt see the second screen shot, makes sense now, the document type must be there before document no. you are right

One more question, I am able to export csv file with header title but when trying to import this exported file I am getting errors -

The Integer table is readonly, so I change AutoSave property to No.

then I get error - The Element is expected by Min Occurs value: Once. Element received: . — what is this?

I want clear myself, can we import csv with header title by mlport?

Thanks in advance.

Is this a different xmplort? same nav version or different?

you might be able to skip first record of csv by coding in xmlport. try that

Its diff xmlport. While exporting I am using Purch Header and while importing I am using Purch Line. Same NAV Version, same database.

share screen shot please, detail as much as you can

This XMLPost - the document number you need to take from the header, but not from file + the same for Doc. Type (I think the system searches the DocumentType=Quote, but not Order)