Reputation: 123
I have tried creating itemFulfillment
records in multiple ways, but no matter what I do, sales orders always end up "completely" fulfilled (regardless of whether all items were actually fulfilled.)
In cases where only "some" of the items in the sales order have been shipped, we need to set those items only to be fulfilled so the appropriate purchase order(s) can be billed and tracking gets sent to customers. When we try to fulfill those items only, the sales order always ends up with ALL items being fulfilled. This creates numerous problems for us.
Things I've tried:
Create new item fulfillment from scratch (without using initialize)
Create new item fulfillment with initialize (to get reference to existing IF record)
Add only line items that have been fulfilled
Add all line items, explicitly setting quantityRemaining = quantity
(where the item has not been fulfilled), and setting quantityRemaining = 0
for fulfilled items.
Trying variations with ReplaceAll = true
, and trying variations again with ReplaceAll = false
.
In every case, every item in the SalesOrder
is marked completely fulfilled (every item is set to fulfilled.)
If anyone has been able to "partially" fulfill a sales order, could you give idea how to do it?
Upvotes: 8
Views: 7349
Reputation: 67
Another possible solution to this problem that I just figured out for myself.
I'm using NetSuite 2021.1 and could not get the partial fulfillment to work properly until I turned on "DEFAULT ITEMS TO ZERO RECEIVED/FULFILLED".
This is a checkbox in NetSuite that you can find in Setup --> Accounting --> Accounting Preferences on the Order Management tab in the Fulfillment section.
Check this box to default items to unfulfilled when you open a fulfillment transaction. Then you can just feed in the item you want fulfilled and it will ignore the ones you don't.
Upvotes: 0
Reputation: 9
Try yourRecObj.setLineItemValue('item", "quantity", 1, "0")
instead of yourRecObj.setLineItemValue('item", "quantity", 1, 0)
Upvotes: 0
Reputation: 2080
itemfulfillment
shipped
Upvotes: 1
Reputation: 265
Followed the above answer and it worked, though could not find quantitySpecified
in the spec for 2016.1 endpoint nor in the initialized fulfillment object, so omitted it and it worked fine.
Another thing to consider is that if your Sales Order
has multiple locations for the items on it and you have initialized the fulfillment, you will need to remove all items with different locations than those you are currently fulfilling. Otherwise, you will get an error message regarding fulfilling from multiple locations the same as you would using the UI. We accomplished this by defaulting quantity to 0 and only adding a quantity for the actual shipment currently fulfilling.
Upvotes: 1
Reputation: 123
I got this working today by doing the following:
ReplaceAll
to falsequantityRemaning
value (after grabbing a reference to the Item fulfillment)quantitySpecified
to true as well)If you are new to processing itemFulfillment
records, be sure that you set the Line to the appropriate line in the sales order. This is done for you automatically if you initialize the record.
See an example of creating an itemFulfillment
record using initialize here (PDF file available on NetSuite website).
Then you just need those three steps above to "partially" fulfill a sales order.
Upvotes: 2