Hi I have a urgent problem. I created a dataport long time ago and we have successfully imported once. But today we tried to import another sales order. It has an error. The following is the error and the code:
/IF "Multiple Ship-to".GET(OrderNo) THEN
IF "Multiple Ship-to".GET(salesheader."No.") THEN
BEGIN
"Multiple Ship-to"."Order No.":=OrderNo;
"Multiple Ship-to"."Sell-To Customer No." := id;
"Multiple Ship-to"."Ship-to Name" :=name;
"Multiple Ship-to"."Line No." := lineno;
"Multiple Ship-to"."Ship-to Contact" :=contact;
"Multiple Ship-to"."Ship-to Address" :=address1;
"Multiple Ship-to"."Ship-to Address 2" :=address2;
"Multiple Ship-to"."Ship-to City" :=city;
"Multiple Ship-to"."Ship-to ZIP Code" := zip;
"Multiple Ship-to"."Ship-to State" :=state;
"Multiple Ship-to"."Ship-to Country Code" :=country;
"Multiple Ship-to"."Shipping Account" :=shippingaccount;
"Multiple Ship-to"."Shipment Method Code" :=methodcode;
"Multiple Ship-to".Notes :=Notes;
"Multiple Ship-to"."Shipping Agent" :=shipagent;
Templine := Templine + 1;
"Multiple Ship-to".INSERT;
Error:
Multiple Ship-to Already Exists, Identification Fields and values Order NO :='' Line No :=10000
Our import file follows the exactly the same order as the dataport fields we created. Please help!!!
0
Comments
ERP Consultant (not just Navision) & Navision challenger
I also tried this. I left the whole column of Line no empty in my import csv file, and then modified my code:
Multiple Ship-to"."Line No." := lineno +10000;
The error is: Multiple Ship-to Already Exists, Identification Fields and values Order NO :='' Line No :=0,
We have 300 records to import and it will be shipped tomorrow. I spent the whole afternoon fixing it, but it didn't work. Appreciate it!
Your problem is that you have blank Order No. in your import file.
You can also do the following
instead of you could do
Albert
are you sure line No isn't part of the key too?
My guess is that this multiple ship to thing is based on each code being differnet like the Ship-To Address Table.
Is this correct? if so I'm not understanding the Line No thing.
Should be a Customer No & A Code as the key. Perhaps more info on this table is needed.
http://www.BiloBeauty.com
http://www.autismspeaks.org