Hello,
How to confirm Shipment or Receipt via code?
Best regards.
Hello,
How to confirm Shipment or Receipt via code?
Best regards.
Best answer by Naveen Boga
Hi
Please use the below code to confirm the shipment.
PXAutomation.CompleteSimple(soShipmentGraph.Document.View);
PXAdapter adapter2 = new PXAdapter(new DummyView(soShipmentGraph, soShipmentGraph.Document.View.BqlSelect,
new List<object> { soShipmentGraph.Document.Current }));
adapter2.Menu = "Confirm Shipment";
adapter2.Arguments = new Dictionary<string, object>();
adapter2.Arguments.Add("actionID", 1);
soShipmentGraph.action.PressButton(adapter2);
TimeSpan timespan;
Exception ex;
while (PXLongOperation.GetStatus(soShipmentGraph.UID, out timespan, out ex) == PXLongRunStatus.InProcess)
{ }
PXAutomation.GetStep(soShipmentGraph, new List<object> { soShipmentGraph.Document.Current }, soShipmentGraph.Document.View.BqlSelect);
PXAutomation.CompleteAction(soShipmentGraph);
PXLongOperation.WaitCompletion(soShipmentGraph.UID);
PXAutomation.GetStep(soShipmentGraph, new List<object> { soShipmentGraph.Document.Current }, soShipmentGraph.Document.View.BqlSelect);
soShipmentGraph.Save.Press();
PXLongOperation.ClearStatus(soShipmentGraph.UID);
Best Regards,
Naveen B
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.