Reputation: 197
I am working on an integration of a bespoke application with Netsuite and there is a requirement where I have to set inventorylocation field at lineitem level while creating a sales order.
I am able to do that via soap api but when i try to fulfill the same line item via soap api, I am getting an error "valid_line_item_reqd" error in netsuite soap itemfulfillment
If I try the same line item from NetSuite UI, i can fulfill it. Also, if I remove the inventorylocation field from sale order , then i can fulfill the item using SOAP api.
Is there anything that need to be passed explicitly which I am missing. PS, this is inventorylocation field and not the location field
Upvotes: 0
Views: 1219
Reputation: 197
got answer from Netsuite support, passing inventoryLocation field is not possible in Item fulfillment via Soap request and is not supported. Use restlet if required
Upvotes: 1
Reputation: 15402
You should not be setting locations at the item fulfillment level.
You should get your item fulfillment with an initialize
or initializeList
operation.
Once you have that you can update the same fields that you can in the UI on the ItemFulfillmentItemList.ItemFulfillmentItem
generally that would be limited to setting custom fields and adjusting itemReceive
and quantity
and the other bin and inventory details
When initialized from a sales order or transferorder your inventory location will be filled in already.
Upvotes: 2
Reputation: 1042
If you are using multi-location inventory (which you seem to be), you need to set the inventorylocation field on each line of the Item Fulfillment record. In the UI, the Item Fulfillment record inherits the value from the Sales Order, which is why you can fulfill there. If creating the Item Fulfillment via SOAP, you will need to specify the value of the field in order to create the line.
Upvotes: 1