Hello,
I am new at Nav, so maybe You can help me. (Also sorry for my english)
I am using NAV 2013 R2.
I am importing data from csv file to sales order, which one already exists, when I am in that order, I click action, which one imports additional information to sales header and imports new sales lines from that file.
My file looks like this:
T072478;left 2pcs;T
11114094;Door UA02-96, L shape;22;1,15; ;
11114093;DoorUA02-128, L shape;16;1,38; ;
In first line is information, which one must be in sales header: Reference;Comment;Boolean(True/False)
Second line is empty
In third line and so on is information about Sales lines: Item No;Description;Quantity;Amount;VariantCode;LocationCode
I wrote code in xmlport but something is wrong, when I am in Sales order and click action, that additional information did not apply to current order in which I am, I think it want create new order.
On that action trigger I just write:
ImportCSV.RUN;
On xmlport SalesHeader-Import::OnAfterInitRecord()
"Sales Line".SETRANGE("Sales Line"."Document Type","Sales Header"."Document Type");
"Sales Line".SETRANGE("Sales Line"."Document No.","Sales Header"."No.");
"Sales Header".GET("Sales Header"."Document Type","Sales Header"."No.");
Maybe I need function in the action trigger which one gets current sales order information?
I don't know if someone understands my problem, but I really need help.