【问题标题】:Acumatica - How to change the page opened by the edit button (pencil)Acumatica - 如何更改编辑按钮打开的页面(铅笔)
【发布时间】:2021-06-12 15:30:48
【问题描述】:

我正在尝试自定义页面,以便编辑按钮(铅笔图标之一)将用户引导至特定页面。就我而言,编辑按钮链接到 BAccountID 字段:

默认情况下,它会打开企业帐户页面(页面 CR303000):

我希望它打开我创建的具有类似 BAccount 视图的不同页面(页面 AR303001):

这可以做到吗?如何 ?我似乎找不到这个逻辑背后的代码。

【问题讨论】:

    标签: customization acumatica erp acumatica-kb


    【解决方案1】:

    目标图在装饰 DAC 的 PXPrimaryGraph 属性中声明。 BAccount DAC 是一种特殊情况,它使用从 PXPrimaryGraph 继承的更复杂的属性(CRCacheIndependentPrimaryGraphList)。

    [CRCacheIndependentPrimaryGraphList(new Type[]{
        typeof(CR.BusinessAccountMaint),
        typeof(EP.EmployeeMaint),
        typeof(AP.VendorMaint),
        typeof(AP.VendorMaint),
        typeof(AR.CustomerMaint),
        typeof(AR.CustomerMaint),
        typeof(AP.VendorMaint),
        typeof(AR.CustomerMaint),
        typeof(CR.BusinessAccountMaint)},
        new Type[]{
            typeof(Select<CR.BAccount, Where<CR.BAccount.bAccountID, Equal<Current<BAccount.bAccountID>>,
                    And<Current<BAccount.viewInCrm>, Equal<True>>>>),
            typeof(Select<EP.EPEmployee, Where<EP.EPEmployee.bAccountID, Equal<Current<BAccount.bAccountID>>>>),
            typeof(Select<AP.VendorR, Where<AP.VendorR.bAccountID, Equal<Current<BAccount.bAccountID>>>>), 
            typeof(Select<AP.Vendor, Where<AP.Vendor.bAccountID, Equal<Current<BAccountR.bAccountID>>>>), 
            typeof(Select<AR.Customer, Where<AR.Customer.bAccountID, Equal<Current<BAccount.bAccountID>>>>),
            typeof(Select<AR.Customer, Where<AR.Customer.bAccountID, Equal<Current<BAccountR.bAccountID>>>>),
            typeof(Where<CR.BAccountR.bAccountID, Less<Zero>,
                    And<BAccountR.type, Equal<BAccountType.vendorType>>>), 
            typeof(Where<CR.BAccountR.bAccountID, Less<Zero>,
                    And<BAccountR.type, Equal<BAccountType.customerType>>>), 
            typeof(Select<CR.BAccount, 
                Where2<Where<
                    CR.BAccount.type, Equal<BAccountType.prospectType>,
                    Or<CR.BAccount.type, Equal<BAccountType.customerType>,
                    Or<CR.BAccount.type, Equal<BAccountType.vendorType>,
                    Or<CR.BAccount.type, Equal<BAccountType.combinedType>>>>>,
                        And<Where<CR.BAccount.bAccountID, Equal<Current<BAccount.bAccountID>>,
                        Or<Current<BAccount.bAccountID>, Less<Zero>>>>>>)
        },
        VerifyRightsBy = new [] { typeof(CR.BusinessAccountMaint) })]
    

    无法轻松自定义此属性。要更改它,您需要将 BAccount DAC 替换为另一个。您的用例的首选方法是通过使用常规操作按钮来避免使用 PXPrimaryGraph 属性。

    动作按钮可以配置为显示铅笔图标: Make PXButton appear as pencil icon

    它可以使用 PXLayout Merge 属性显示在字段旁边,也可以使用 LinkCommand 重定向: https://stackoverflow.com/a/60446714/7376238

    【讨论】:

    • 谢谢!我将尝试添加自己的按钮并以这种方式重定向用户。我只是还有一个问题,如果无法自定义,如何隐藏原始编辑按钮?
    • 我成功添加了一个新的“铅笔”按钮,可以打开正确的页面。但我找不到如何隐藏原始按钮。
    • 自定义 ASPX 屏幕中的字段以删除 AllowEdit=True 属性。
    猜你喜欢
    • 2011-06-03
    • 1970-01-01
    • 2013-01-07
    • 1970-01-01
    • 2016-05-19
    • 1970-01-01
    • 1970-01-01
    • 2011-10-08
    • 2015-08-30
    相关资源
    最近更新 更多