【问题标题】:Acumatica Generic Inquiry Adding to Inquiries Menu (Automation Steps)Acumatica 通用查询添加到查询菜单(自动化步骤)
【发布时间】:2018-06-11 19:08:46
【问题描述】:

将 GI 添加到报告菜单很容易,但在this Technical Tuesday post Doug 中描述了一些额外的步骤,需要遵循自定义才能将 GI 添加到 INQUIRIES 菜单:

有没有人按照他的步骤走运?我在他分享的代码中不断收到很多验证错误,希望得到更好的解释。

在自定义步骤之后,我们只需将其添加到自动化步骤。

【问题讨论】:

    标签: customization acumatica


    【解决方案1】:

    请使用下面的自定义代码,直到我们解决技术星期二帖子中的问题。

    using System;
    using System.Collections;
    using PX.Data;
    using PX.Objects.PO;
    
    namespace PXDemoPkg
    {
        public class POOrderEntry_Extension : PXGraphExtension<POOrderEntry>
        {
    
            public PXAction<POOrder> inquiry;
    
            [PXUIField(DisplayName = "Inquiries", MapEnableRights = PXCacheRights.Select)]
            [PXButton]
            protected virtual IEnumerable Inquiry(PXAdapter adapter,
                [PXInt] [PXIntList(new int[] { 1, 2, 3 },
                                   new string[] { "Vendor Details", "Activities", "PO Prepayments" })] int? inquiryID)
            {
                if (inquiryID == 3)
                {
                    POOrder order = Base.Document.Current;
    
                    string giURL = PXGenericInqGrph.INQUIRY_URL;
                    string gIName = "POprepayments";
                    string sParameter1Name = "POnumber";
                    string sParameter1Value = order.OrderNbr;
    
                    string url = String.Format("{0}?Name={1}&{2}={3}", giURL, gIName, sParameter1Name, sParameter1Value);
    
                    throw new PXRedirectToUrlException(url, PXBaseRedirectException.WindowMode.New, true, "POprepayments-GI");
                }
                else
                    return Base.inquiry.Press(adapter);
            }
        }
    
    }
    

    【讨论】:

    • 谢谢!更好的方法不必指定 URL :)
    • @Ahmed,不客气。技术星期二的帖子也得到了更正。
    猜你喜欢
    • 2017-10-08
    • 1970-01-01
    • 2020-12-14
    • 2016-11-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-02-04
    相关资源
    最近更新 更多