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);