Reputation: 756
I am trying to create an Item Fulfillment in NetSuite using SuiteTalk via C#
I have successfully created Item Fulfillments in the past and this is the first time trying to create one with Kit Items. I am setting the orderLine properly, but I do not know what to set the Kit's components to.
If I do not send the kit components over I get an error saying that I have to send over all of the items.
NetSuite Error: [Code=USER_ERROR] All lines of sublist itemList have to be specified when replace All is requested.
If I try to set the orderline the same as the Kit Item this will generate another error.
I have examined an Item Fulfillment in javascript and noticed that the components do not have any orderLine values, but instead have kitlevel values (which is not present on an ItemFulfillmentItem in C#)
Any help on this would be appreciated.
Upvotes: 1
Views: 2344
Reputation: 756
Found the answer. By initializing the form I was able to inspect the elements and see what I was missing. Each of the components of the kit item are at +1 orderLine number from the perviouse item.
So if my Kit Item was orderLine 5 then Component is orderLine6 and Component is orderLine7
Below find the code that was used to create the initialize the item fulfillment in order to examine the items.
ItemFulfillment ns_ItemFulfillment;
// attempt to initialize item Fulfillment from the created from record
InitializeRecord initrec = new InitializeRecord()
{
type = InitializeType.itemFulfillment,
reference = new InitializeRef()
{
internalId = salesOrder.internalId,
type = InitializeRefType.salesOrder,
typeSpecified = true
}
};
ReadResponse response = _service.initialize(initrec);
if (response.status.isSuccess)
{
if (response.record != null)
ns_ItemFulfillment = (ItemFulfillment)response.record;
}
Upvotes: 2