Skip to main content
Answer

Unable to create Shipment by code - Acumatica

  • January 20, 2021
  • 2 replies
  • 374 views

SadokHanini
Freshman II

Hi,

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.

Best answer by Naveen Boga

@SadokHanini If the Lot/Serial class of the stock items “Tracking Method” is “Track Serial Numbers” , then you need to use “Allocations” popup to add the slots and assign in Shipments screen.

 

 

2 replies

Gabriel Michaud
Captain II
Forum|alt.badge.img+11

@SadokHanini what is the configuration of the lot/serial class of the stock items included in the order? It looks like you’re using items that need manual assignment of the lot/serial numbers


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • Answer
  • January 21, 2021

@SadokHanini If the Lot/Serial class of the stock items “Tracking Method” is “Track Serial Numbers” , then you need to use “Allocations” popup to add the slots and assign in Shipments screen.