Solved

Creating a shipment with a wrong shipment number prefix (brand Id problem)

  • 11 December 2020
  • 3 replies
  • 126 views

Userlevel 2

Using this code, accumatica create my new SOShipment from the new SOOrder. The new SOShipment is associated in New BranchId and that we need extactly.

Problem : the ShipmentNbr of new SOShipment get the perfix of the Old BranchId

SOShipmentEntry soShipmentGraph = PXGraph.CreateInstance<SOShipmentEntry>();

soShipmentGraph.Clear();

DocumentList<SOShipment> created = new DocumentList<SOShipment>(soShipmentGraph);

SOShipment sOShipment = new SOShipment();

created.Add(sOShipment);

soShipmentGraph.CreateShipment(newOrder,5, newOrder.OrderDate, true, SOOperation.Issue, created);

 

icon

Best answer by Naveen Boga 15 December 2020, 09:50

View original

3 replies

Userlevel 7
Badge +17

Hi @SadokHanini 

Can you please also share the source code that you are creating Sales Orders from one branch to other branch.

Userlevel 7
Badge +17

Hi @SadokHanini 

 

As you are creating shipment from one branch to another branch. Please use the below code to set the current Branch and then have logic for creating the shipment.

int branchObj = 2; 
 PXContext.SetBranchID(branchObj);

Hope this helps !!

 

Best Regards,

Naveen B

Userlevel 2

Hi @SadokHanini 

 

As you are creating shipment from one branch to another branch. Please use the below code to set the current Branch and then have logic for creating the shipment.

int branchObj = 2; 
 PXContext.SetBranchID(branchObj);

Hope this helps !!

 

Best Regards,

Naveen B

It’s Working Thanks :) 

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved