Search code examples
c#netsuitesuitetalk

Configuring inventory detail on Item Fulfillment item list, using C# and SuiteTalk


I am coding in C#, using the SuiteTalk Web Services to create Item Fulfillment records from existing sales orders. I am not sure how to configure the inventory detail, when serial numbers are specified on items.

I successfully generate the item fulfillment and can update NetSuite when items are not serialized. When items are serialized, I get the following error:

"Please configure the inventory detail in line 1 of the item list."

I run through each line item and check whether it is fulfilled, after which I add it to my new item fulfillment list as follows:

List<ItemFulfillmentItem> ifitems = new List<ItemFulfillmentItem>();

ItemFulfillmentItem ffItem = new ItemFulfillmentItem();
ffItem.item = ifitemlist.item[b].item;
ffItem.orderLineSpecified = true;
ffItem.orderLine = ifitemlist.item[b].orderLine;

ffItem.quantity = msg.despatchItems[i].qtyDespatched;
ffItem.quantitySpecified = true;
ifitems.Add(ffItem);

ItemFulfillmentItemList ifitemlistToFulfill = new ItemFulfillmentItemList();
ifitemlistToFulfill.item = ifitems.ToArray();
newItemFulfill.itemList = ifitemlistToFulfill;

WriteResponse writeRes = _service.add(newItemFulfill);

Any help would be appreciated.


Solution

    1. You need to add and inventory detail subrecord for each line item
    2. Then you will have to set the serialnumber* and **qty

    You cannot add a comma-separated list as you must specify the qty

    I am not familiar with the C# api, only the JS and Java api which all have the same workflow (inventory detail subrecord)