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>();
DocumentList<SOShipment> created = new DocumentList<SOShipment>(soShipmentGraph);
SOShipment sOShipment = new SOShipment();
soShipmentGraph.CreateShipment(newOrder,5, newOrder.OrderDate, true, SOOperation.Issue, created);
Best answer by Naveen B
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;
Hope this helps !!