0
votes

I trying to create shipment by code in Acumatica, it's working fine with Inventory item without Serial Number but im getting this error with item with serial number

**PX.Data.PXRowPersistingException: 'SO Error: One or more lines have unassigned slots and / or lot / serial number**

i m using this code to create the shipment:

SOShipmentEntrysoShipmentGraph=PXGraph.CreateInstance<SOShipmentEntry>();
soShipmentGraph.Clear();
DocumentList<SOShipment>created=newDocumentList<SOShipment>(soShipmentGraph);
SOShipmentsOShipment=newSOShipment();
created.Add(sOShipment);
soShipmentGraph.CreateShipment(newOrder,5,newOrder.OrderDate,true,SOOperation.Issue,created);

what i m missing ? Thanks.

1

1 Answers

0
votes

My guess is that you don't have enough inventory to fill the SO line qty. The CreateShipment API tried to allocate 5 widgets for example and found only 4 available Serial numbers. You should look up the inventory item and confirm that sufficient qtys exist.