Solved

confirm Shipment via code

  • 23 November 2020
  • 4 replies
  • 287 views

Userlevel 2

Hello,

How to confirm Shipment or Receipt via code?

Best regards.

 
icon

Best answer by Naveen Boga 23 November 2020, 11:24

View original

4 replies

Userlevel 7
Badge +17

Hi @mohamed1walha,

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

Userlevel 2

thank's @naveenb74 

Userlevel 2

Resolved.

Userlevel 7
Badge +17

@mohamed1walha  Awesome :)

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