Discussions
ERROR: You must enter at least one line item for this transaction
I keep recieving the error "You must enter at least one line item for this transaction". Is this error due to a problem with my code or is it due to the issue discussed in this thread. Please help if possible either way.
ItemFulfillment ifm = new ItemFulfillment();
RecordRef rf1 = new RecordRef();
rf1.internalId = "20241";
rf1.type = RecordType.salesOrder;
ifm.createdFrom = rf1;
ItemFulfillmentItemList ifml = new ItemFulfillmentItemList();
ifml.replaceAll = false;
ItemFulfillmentItem ifmitem = new ItemFulfillmentItem();
RecordRef rfitem = new RecordRef();
rfitem.internalId = "4601";
rfitem.type = RecordType.inventoryItem;
ifmitem.orderLine = 1;
ifmitem.orderLineSpecified = true;
ifmitem.item = rfitem;
ifmitem.quantity = 2.0;
ifmitem.quantitySpecified = true;
ifml.item = new ItemFulfillmentItem[]{ifmitem};
ifm.itemList = ifml;