使用PXCustomizeSelectorColumns
属性。
代码可以由Acumatica定制项目编辑器通过SELECTOR COLUMNS
部分中的DATA ACCESS
操作生成:
这是它将生成的代码。作为示例,我在最后添加了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; }
}
}