如何将操作和处理程序添加到“处理货件”屏幕?我们想要向屏幕 SO503000 上的“操作”组合框添加一个操作,然后在代码中添加一个处理程序来处理新操作。我们希望在不必覆盖 SOShipmentEntry 图中 Action 的巨大 switch/case 语句的情况下执行此操作。
The PXAutomationMenu attribute pulls from Automation Steps all actions, which have appropriate processing screen set up as Mass Processing Screen:
要扩展“处理货件”屏幕上可用的操作列表,请按以下步骤操作:
在 BLC 扩展中声明自定义操作,并在 BLC 初始化期间调用 AddMenuAction 方法,将其添加为操作按钮的下拉项
To add custom action to the Process Shipments screen, add custom actions to appropriate automation step(s) and specify Mass Processing Screen ID. When user selects your custom action, Shipments from all Automations Steps, that contain a custom action, will be available for selection on the Process Shipments screen:
为 SOShipmentEntry BLC 声明的两个扩展(相同的第一级)(如下面的代码片段所示)可用于通过多个自定义项目(两个彼此独立的自定义包;一个或两者都可以在特定站点上发布。并且两者都向“处理货件”屏幕添加操作):
为了解决这种情况,:
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);
}
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)