Hi,
i want to import a sales order with 1 sales line using a xmlport. it works, when i set the SalesHeader.No. and the SalesLine.DocumentNo in the xml import file.
but i also want to import a sales order without setting the no./document no. in the xml import file. the import mechanism should set the no./document no. automatically using the according no. series. i have done that by setting some code in the "Sales Header"-No - Import::OnAfterAssignField() Trigger and it works fine. the import creates a new document no., the sales header part is imported. but not the sales line part.
setting the document no. by code in the Line - Import::OnAfterInitRecord(), Line - Import::OnBeforeInsertRecord() or DocumentNo - Import::OnAfterAssignField() does not work. there is always an error message: Conflict between data and LineTable/LinkFields Setup in table Line.
LinkTable: Sales Header; LinkFields: Document No.=FIELD(No.)
(i also tried the LinkFields with Document Type=FIELD(Document Type);Document No.=FIELD(No.))
Every help will be appreciated. Thx.
*This post is locked for comments