5
Points
Questions
1
Answers
1
-
The problem was with the internalIDs in the inventoryAssignmentList. The initialise method for some reason sets them all to -1 so if you have more than one item, you get many items with the same internalID, and even though its an invalid ID the API complains. The solution is null them as shown below:
foreach (ItemReceiptItem item in itemReceipt.itemList.item)
{
if (item.inventoryDetail != null)
{
foreach (InventoryAssignment invAssignment in item.inventoryDetail.inventoryAssignmentList.inventoryAssignment)
{
invAssignment.internalId = null;
invAssignment.quantitySpecified = false;
}
}
}
- 582 views
- 1 answers
- 0 votes