Acumatica - 如何更改编辑按钮铅笔打开的页面

问题描述

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

enter image description here

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

enter image description here

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

enter image description here

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

解决方法

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

[CRCacheIndependentPrimaryGraphList(new Type[]{
    typeof(CR.BusinessAccountMaint),typeof(EP.EmployeeMaint),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,typeof(Select<AP.Vendor,Where<AP.Vendor.bAccountID,Equal<Current<BAccountR.bAccountID>>>>),typeof(Select<AR.Customer,Where<AR.Customer.bAccountID,typeof(Where<CR.BAccountR.bAccountID,Less<Zero>,And<BAccountR.type,Equal<BAccountType.vendorType>>>),Equal<BAccountType.customerType>>>),typeof(Select<CR.BAccount,Where2<Where<
                CR.BAccount.type,Equal<BAccountType.prospectType>,Or<CR.BAccount.type,Equal<BAccountType.customerType>,Equal<BAccountType.vendorType>,Equal<BAccountType.combinedType>>>>>,And<Where<CR.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