Fulfilment scheme
Updated
User: how to choose a scheme. Analyst: store.
Field InventorySettings.FulfillmentScheme (WarehouseFulfillmentScheme).
SalesFulfillmentService.PrepareShipmentAsync reads it after saving a confirmed order, not from OnAfterPost: the platform swallows nested posting from there, and the transfer would stay a draft.
Simple calls ConsolidateStorageAsync. Extended and Unspecified (zero, empty field) call EnsurePickDraftAsync. Both split the line through one AllocateStorageAsync: storage cells in hint order; a line whose total is insufficient does not get a document. The simple scheme posts StockTransfer to the cell. The extended scheme writes a draft PickTask for each source cell and does not move the balance. A line that fits into the first cell is still one document. Zero must mean “do not move automatically”: the enum is non-nullable.
An already linked StockTransfer or PickTask on the order is not created again, and does not move the balance again. Changing the scheme retroactively does not replace this child.
PlanPickWaveAsync (command PlanPickWave, Sales 1.53.0) then folds drafts. A group is one FromCell. A draft enters the group if its document family has a SalesOrder parent. Two or more: a new draft with the same lines, a link to it for every order, and the old tasks are deleted. One item in a group stays as it is. A confirmed picking task is not selected by Subtype = 'Draft'. A task without an order is not selected, otherwise a manual picking from the same cell would move into someone else’s wave. The method does not move balance: the header still has one cell, and confirmation sums the lines itself.
Same topic for other readers: Analyst · User