IF ItemDiscGrCode <> '' THEN BEGIN SETRANGE(Type,Type::"Item Disc. Group"); SETRANGE(Code,ItemDiscGrCode); CopySalesDiscToSalesDisc(FromSalesLineDisc,ToSalesLineDisc);//Blocca il Web Service END;Here is my .net code
OrderService = new Order_Service(); OrderService.UseDefaultCredentials = true; Order SalesOrder = OrderService.Read(OrderNo); SalesOrder.SalesLines = SalesOrder.SalesLines.Concat(new[] { new Sales_Order_Line() }).ToArray(); OrderService.Update(ref SalesOrder); count = SalesOrder.SalesLines.Length; Sales_Order_Line line1 = SalesOrder.SalesLines[count-1]; line1.Type = OrderReference.Type.Item; line1.No = ItemNo; line1.Quantity = Quantity; line1.QuantitySpecified = true; line1.Unit_Price = Price; line1.Unit_PriceSpecified = true; OrderService.Update(ref SalesOrder);Any idea? If the item has no discount group everything goes well
Answers