Hi
I am getting the below error:
{A product must be set before the quantity on an order line. (id=1440878712)}
It is based on the following code.
foreach (ic1801_order_detail od in orderLines)
{
IOrderLineData orderLine = _sessionOrderLineDataCreate(orderCreated);
orderLineOrderCurrency = currency;
string productId = 2000;
if (odproduct_supplier_reference != null)
if (odproduct_supplier_referenceLength 0)
productId = odproduct_supplier_reference;
orderLineProduct = _sessionProductFindByNumber(productId);
orderLineQuantity = odproduct_quantity;
orderLineUnitNetPrice = odproduct_price;
orderLineDescription = odproduct_name;
IOrderLine orderLineCreated = _sessionOrderLineCreateFromData(orderLine);
}
My problem is, that the productid is found in the line, so I do not understand why the error occurs:
orderLine.Product = _session.Product.FindByNumber(productId);
When I look into the database it seems like the product has been added to the order.
Any idea, why I have this problem would be appreciated, since I do not understand the cause of this problem. Im using VS2010 SP1
Regards,
Dennis
I am getting the below error:
{A product must be set before the quantity on an order line. (id=1440878712)}
It is based on the following code.
foreach (ic1801_order_detail od in orderLines)
{
IOrderLineData orderLine = _sessionOrderLineDataCreate(orderCreated);
orderLineOrderCurrency = currency;
string productId = 2000;
if (odproduct_supplier_reference != null)
if (odproduct_supplier_referenceLength 0)
productId = odproduct_supplier_reference;
orderLineProduct = _sessionProductFindByNumber(productId);
orderLineQuantity = odproduct_quantity;
orderLineUnitNetPrice = odproduct_price;
orderLineDescription = odproduct_name;
IOrderLine orderLineCreated = _sessionOrderLineCreateFromData(orderLine);
}
My problem is, that the productid is found in the line, so I do not understand why the error occurs:
orderLine.Product = _session.Product.FindByNumber(productId);
When I look into the database it seems like the product has been added to the order.
Any idea, why I have this problem would be appreciated, since I do not understand the cause of this problem. Im using VS2010 SP1
Regards,
Dennis