如何将报告添加到“库存转移”下拉菜单中以进行报告

时间:2017-07-20 14:45:04

标签: acumatica

我想在“库存转移”屏幕的下拉菜单中添加报告。在搜索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方法。

如何添加报告以启动此菜单以进行库存转移?

1 个答案:

答案 0 :(得分:0)

根据我的经验,操作按钮通常由操作 BLC成员表示,报告按钮由报告 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(...);
        }
    }
}
相关问题