Hi,
i think that you need to generate new NAV orders numbers from xmlport and after pass it to header & lines,
if you have order number > map & pass No. on header & "document No." on Lines sections of XML port.
Look at xmlport "Inbound Sales Order", is an example
1 - Table InSalesDocHdr(Inbound Sales Document Header) > HEADER TABLE
"On Before Insertrecord" trigger
you have this function :
XMLDocTransform.PopulateInSalesDocFields(InSalesDocHdr,TrackingID,PartnerNo,BizTalkSalesDocType::Order);
InSalesDocHdr."Doc. Transformation Succeeded" := TRUE;
This function compile some fields not mapped on xmlport
you can add for example "Sales Header"."No." using a function like XMLDocTransform... or assigning directly a value
"Sales Header"."No." := GetNextNo(...) with standard numbering NAV functions
2 - Table InSalesDocLine(Inbound Sales Document Line) > LINES TABLE
Sales lines
> you can pass "Document no." directly by liktable & linkfields links & with forceInsert =True
or assigning "Sales Header"."No." that you have assigned before)
ex:
linktable > InSalesDocHdr
linkfields > Inbound Document No.=FIELD(Inbound Document No.)
On XML Import
> you don't need to map "No." & "Document no." attributes for header & lines if you need to generate news orders numbers
> if you have more fields mapped on xml structure system in import checks all fileds,
On XML Export
> you must map all fields or variables (fixed structure)
XMLport Sales Order Example
msdn.microsoft.com/.../dd338612.aspx