如何将报告添加到报告的库存转移下拉菜单
How to add report to Inventory Transfers dropdown menu for reports
我想将报告添加到“库存转移”屏幕的下拉菜单中。在搜索 Stack Overflow 后,我找到了以下示例,但由于它似乎总是发生,因此它似乎不适用于此屏幕(该示例适用于 APPaymentEntry BLC):
public class APPaymentEntry_Extension : PXGraphExtension<APPaymentEntry>
{
public override void Initialize()
{
Base.action.AddMenuAction(ShowURL);
}
public PXAction<APPayment> ShowURL;
[PXUIField(DisplayName = "Print Remittance")]
[PXButton]
protected virtual void showURL()
{
APPayment doc = Base.Document.Current;
if (doc.RefNbr != null)
{
throw new PXReportRequiredException(doc, "AP991000", null);
}
}
}
INTransferEntry 的图形扩展没有 Base.action.AddMenuAction 方法。
如何添加报告以启动到此库存转移菜单?
根据我的经验,Actions 按钮通常由 action BLC 成员和 Reports 按钮由 报告 BLC 成员代表。
以下代码片段应将报告添加到报告的“库存转移”下拉菜单中:
public class INTransferEntryExt : PXGraphExtension<INTransferEntry>
{
public override void Initialize()
{
Base.report.AddMenuAction(ShowCustomReport);
}
public PXAction<INRegister> ShowCustomReport;
[PXButton]
[PXUIField(DisplayName = "Show Custom Report")]
protected void showCustomReport()
{
INRegister doc = Base.transfer.Current;
if (doc != null && doc.RefNbr != null)
{
throw new PXReportRequiredException(...);
}
}
}
我想将报告添加到“库存转移”屏幕的下拉菜单中。在搜索 Stack Overflow 后,我找到了以下示例,但由于它似乎总是发生,因此它似乎不适用于此屏幕(该示例适用于 APPaymentEntry BLC):
public class APPaymentEntry_Extension : PXGraphExtension<APPaymentEntry>
{
public override void Initialize()
{
Base.action.AddMenuAction(ShowURL);
}
public PXAction<APPayment> ShowURL;
[PXUIField(DisplayName = "Print Remittance")]
[PXButton]
protected virtual void showURL()
{
APPayment doc = Base.Document.Current;
if (doc.RefNbr != null)
{
throw new PXReportRequiredException(doc, "AP991000", null);
}
}
}
INTransferEntry 的图形扩展没有 Base.action.AddMenuAction 方法。
如何添加报告以启动到此库存转移菜单?
根据我的经验,Actions 按钮通常由 action BLC 成员和 Reports 按钮由 报告 BLC 成员代表。
以下代码片段应将报告添加到报告的“库存转移”下拉菜单中:
public class INTransferEntryExt : PXGraphExtension<INTransferEntry>
{
public override void Initialize()
{
Base.report.AddMenuAction(ShowCustomReport);
}
public PXAction<INRegister> ShowCustomReport;
[PXButton]
[PXUIField(DisplayName = "Show Custom Report")]
protected void showCustomReport()
{
INRegister doc = Base.transfer.Current;
if (doc != null && doc.RefNbr != null)
{
throw new PXReportRequiredException(...);
}
}
}