Acumatica 如何将操作和处理程序添加到流程装运屏幕?
如何将操作和处理程序添加到流程装运屏幕?我们希望在屏幕SO503000上的action组合框中添加一个操作,然后在代码中添加一个处理程序来处理新操作。我们希望这样做,而不必覆盖SOShipmentEntry图中操作的巨大switch/case语句。PXAutomationMenu属性从自动化步骤中提取所有操作,这些操作具有设置为批量处理屏幕的适当处理屏幕: 要扩展“处理装运”屏幕上可用的操作列表,请按以下步骤操作:Acumatica 如何将操作和处理程序添加到流程装运屏幕?,acumatica,Acumatica,如何将操作和处理程序添加到流程装运屏幕?我们希望在屏幕SO503000上的action组合框中添加一个操作,然后在代码中添加一个处理程序来处理新操作。我们希望这样做,而不必覆盖SOShipmentEntry图中操作的巨大switch/case语句。PXAutomationMenu属性从自动化步骤中提取所有操作,这些操作具有设置为批量处理屏幕的适当处理屏幕: 要扩展“处理装运”屏幕上可用的操作列表,请按以下步骤操作: 在BLC扩展中声明自定义操作,并在BLC初始化期间调用AddMenuAction
public class SOShipmentEntryExt1 : PXGraphExtension<SOShipmentEntry>
{
public PXAction<SOShipment> Test1;
[PXButton]
[PXUIField(DisplayName = "Test Action 1")]
protected void test1()
{
throw new PXException("Not implemented action: {0}", "Test Action 1");
}
public override void Initialize()
{
Base.action.AddMenuAction(Test1);
}
}
public class SOShipmentEntryExt2 : PXGraphExtension<SOShipmentEntry>
{
public PXAction<SOShipment> Test2;
[PXButton]
[PXUIField(DisplayName = "Test Action 2")]
protected void test2()
{
throw new PXException("Not implemented action: {0}", "Test Action 2");
}
public override void Initialize()
{
Base.action.AddMenuAction(Test2);
}
}
公共类SoShipmentryext1:pxGrapherExtension
{
公共行动测试1;
[按钮]
[PXUIField(DisplayName=“测试操作1”)]
受保护的void test1()
{
抛出新的PXException(“未实现的操作:{0}”,“测试操作1”);
}
公共覆盖无效初始化()
{
Base.action.AddMenuAction(Test1);
}
}
公共类SoShipmentryExt2:PXGrapherExtension
{
公共行动测试2;
[按钮]
[PXUIField(DisplayName=“测试操作2”)]
受保护的void test2()
{
抛出新的PXException(“未实现的操作:{0}”,“测试操作2”);
}
公共覆盖无效初始化()
{
Base.action.AddMenuAction(Test2);
}
}