RE: Transforming a Sales Order into Item Fulfillment via REST Web Services

I’m trying to learn how to do things with REST web services and I’ve hit a roadblock. I’m trying to transform a Sales Order into an Item Fulfillment, but Netsuite’s documentation is lacking on what information needs to be supplied to do so. Does anyone have experience with this?

 

I’m try to do so by reaching out to this endpoint:

POST {{REST_SERVICES}}/record/v1/salesOrder/{{SO_ID}}/!transform/itemfulfillment
BODY:
{
"item": {
"items": [
{
"item": { "id": "{{ITEM_ID}}" },
"amount": 1
}
]
}
}
This request gives me this error:
Error while accessing a resource. You have attempted an invalid sublist or line item operation. You are either trying to access a field on a non-existent line or you are trying to add or remove lines from a static sublist.
I’m not sure what the problem is. If I leave the item sublist off, the call complains that I must fulfill at least one line, so the sublist is clearly required.

Additional Notes:

  • Inventory statuses are OFF
  • Bins are OFF
Any help would be appreciated.
Thanks.
aaron_tekton Rookie Asked on March 15, 2021 in SuiteTalk.
Add Comment
1 Answers

Go through Working with Sublists. Your items sublist does not contain a keyed field, so its being interpreted as trying to add an item to a fulfillment.

Intermediate Answered on March 15, 2021.

Thanks. This is helpful. Do you know of a way to tell what field Netsuite is expecting to key on? I’m having no luck with trial and error. I’ve reviewed the OpenAPI details for Sales Orders and Item Fulfillments and I see that Sales Orders have a field called lineuniquekey yet I’m not able to find any way of passing this value to the Item Fulfillment in the way that it accepts. I’ve also tried using the orderLine field as a key, and it feels like I get closer when I use it, but it only feels that way because it results in an Unexpected Error response rather than an ‘Invalid sublist operation’ response.

on March 16, 2021.

Should be the orderLine for fulfillments

on March 17, 2021.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.