我们如何自定义位于APTran中的APActiveProjectAttribute()选择器属性

问题描述 投票:0回答:1

我想在项目选择器中添加一列,如屏幕截图所示。

我的问题是如何在网站文件中找到选择器代码以及如何为APActiveProjectAttribute()添加列

enter image description here

selector acumatica
1个回答
0
投票

使用PXCustomizeSelectorColumns属性。

代码可以由Acumatica定制项目编辑器通过SELECTOR COLUMNS部分中的DATA ACCESS操作生成:

enter image description here

这是它将生成的代码。作为示例,我在最后添加了OwnerID。您可以按所需顺序添加部门列。请注意,部门应该在PMProject DAC中(如果自定义字段将是PMProject DAC扩展名),以便在选择器中可以使用它。

using PX.Data;

namespace PX.Objects.AP
{
    [PXNonInstantiatedExtension]
    public class AP_APTran_ExistingColumn : PXCacheExtension<PX.Objects.AP.APTran>
    {
        [PXMergeAttributes(Method = MergeMethod.Append)]
        [PXCustomizeSelectorColumns(
        typeof(PX.Objects.PM.PMProject.contractCD),
        typeof(PX.Objects.PM.PMProject.description),
        typeof(PX.Objects.PM.PMProject.status),
        typeof(PX.Objects.PM.PMProject.customerID),
        typeof(PX.Objects.AR.Customer.acctName),
        typeof(PX.Objects.PM.PMProject.ownerID))]
        public int? ProjectID { get; set; }
    }
}
© www.soinside.com 2019 - 2024. All rights reserved.