3

I have a graph call action Create Shipment as below

var soshipmentEntry = PXGraph.CreateInstance<SOShipmentEntry>();
var confirmShipment =(soshipmenEntry.Actions["action"].GetState(null) as PXButtonState).Menus.FirstOrDefault(p => p.Command == "Confirm Shipment");
var adapter = new PXAdapter(new DummyView(Base, Base.Document.View.BqlSelect,
                        new List<object> { Base.Document.Current }))
                        {
                            Menu = confirmShipment.Command
                        };
soshipmentEntry.Actions["action"].PressButton(adapter);

And i don't know when action is completed. How can i get status like GetProcessStatus?

Larry Dinh
  • 379
  • 1
  • 3
  • 16

1 Answers1

2

I propose you to consider folder where acumatica is installed. There is a code graph SOShipmentEntry.cs. It has interesting code:

    switch (actionID)
                {
                    case 1:
                        {
    .
    .
    .

    Save.Press();
    PXAutomation.CompleteAction(this);
    PXLongOperation.WaitCompletion(this.UID);
    PXLongOperation.ClearStatus(this.UID);
}

So I recommend you to give a try to PXLongOperation.WaitCompletion

Yuriy Zaletskyy
  • 4,983
  • 5
  • 34
  • 54