我有一个图表调用操作创建发货如下
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);
我不知道行动何时完成。我怎样才能获得像GetProcessStatus这样的状态?
答案 0 :(得分:2)
我建议你考虑安装acumatica的文件夹。有一个代码图SOShipmentEntry.cs。 它有趣的代码:
switch (actionID)
{
case 1:
{
.
.
.
Save.Press();
PXAutomation.CompleteAction(this);
PXLongOperation.WaitCompletion(this.UID);
PXLongOperation.ClearStatus(this.UID);
}
所以我建议你尝试一下PXLongOperation.WaitCompletion