How to "partially" fulfill a sales order?

I tried to create itemFulfillment records itemFulfillment several ways, but no matter what I do, sales orders always end β€œcompletely” (regardless of whether all items are completed).

In those cases where only β€œsome” of the items in the sales order were sent, we must establish that these elements are executed only so that the corresponding order orders can be invoiced and the tracking sent to customers. When we try to fulfill only these points, the sales order always ends with the completion of ALL items. This creates numerous problems for us.

Things I tried:

  • Create execution of a new element from scratch (without using initialization)

  • Create a new element execution with initialization (to get a link to an existing IF record)

  • Only add items that have been completed.

  • Add all items by explicitly setting quantityRemaining = quantity (where the item was not executed) and setting quantityRemaining = 0 for completed items.

  • Attempted changes using ReplaceAll = true and ReplaceAll = false using ReplaceAll = false .

In each case, each item in SalesOrder marked as fully completed (each item is configured to run.)

If someone was able to "partially" complete a sales order, could you give an idea how to do this?

+6
source share
2 answers

Today I got this work by doing the following:

  • Set ReplaceAll to false
  • Avoid setting the quantityRemaning value (after capturing a reference to the item's execution)
  • Set the quantity to the quantity sent (be sure to set quantitySpecified to true)

If you are new to itemFulfillment record itemFulfillment , make sure you set the line to the appropriate line in the sales order. This is done automatically for you if you initialize the recording.

See an example of creating an itemFulfillment record using initialization here (a PDF file is available on the NetSuite website).

Then you just need to complete these three steps in order to "partially" complete the sales order.

+2
source

Followed the above answer and it worked, although it could not find quantitySpecified in the specification for the 2016.1 endpoint or in the initialized execution object, so I omitted it and it worked fine.

Another thing to keep in mind is that if your Sales Order has multiple locations for items on it, and you have initiated execution, you will need to delete all the items in different places than what you are currently executing. Otherwise, you will receive an error message regarding execution from several places, the same as when using the user interface. We accomplished this by setting the quantity to 0 and adding only the quantity of the actual delivery currently being performed.

+1
source

Source: https://habr.com/ru/post/919422/


All Articles