Hi Nay guys,
I am creating unit test on the basis of web service that is created by exposing NAV page/ code units as Web service.
Now i'm creating unit test on inbound order below is the code for the same:
InboundOrder.InboundOrder_PortClient ioClient = new InboundOrder.InboundOrder_PortClient();
InboundOrder.InboundOrder newIO = new InboundOrder.InboundOrder();
ioClient.Create(ref newIO);
newIO.Customer_No = "ICOC000001";
newIO.Master_Transport_Contract = "ICOM000096";
newIO.Order_Type = "NORMAL";
newIO.Order_Date = DateTime.Now;
newIO.Goods_Status = InboundOrder.Goods_Status.Container;
newIO.Location_code = "ZA-SITE";
newIO.WMS_Warehouse = "ZA-WH";
newIO.Loading_Date = DateTime.Now;
newIO.Unloading_Date = DateTime.Now.AddDays(1);
ioClient.Update(ref newIO);
newIO.sfOrderLines = new InboundOrder.WMS_Inbound_Order_Lines[1];
newIO.sfOrderLines[0] = new InboundOrder.WMS_Inbound_Order_Lines();
//ioClient.Update(ref newIO);
var orderLines = newIO.sfOrderLines[0];
orderLines.Line_Type = InboundOrder.Line_Type.Item;
orderLines.Code = "ICOSKU00000000000002";
orderLines.Productcode = "VEHICLE TYRES";
orderLines.Variant = "GOODYEAR";
orderLines.Description = "Vehicle Tyres";
orderLines.Quantity = 500;
orderLines.Unit_of_measure = "EA";
orderLines.Quantity_Base = 200;
orderLines.Weight = 1000;
ioClient.Update(ref newIO); // error occures here
the error screenshot is attached below

while updating order line it encounter some error below
Error message is
Code must have a value in Order Lines: Type=Inbound Order, Internal Document No.=ICOIB00038, Line No.=10000. It cannot be zero or empty.
even supplied code. please suggest me any workaround to avoid this issue.
*This post is locked for comments
I have the same question (0)