首页 > 解决方案 > 注意 InventoryItem DAC 中的属性

问题描述

我正在编写一个需要 InventoryItem DAC 中的几个字段的例程,我注意到 NoteID 字段上的所有属性。我知道 [PXNote] 属性包含注释字段和方法的所有属性,但是 [PXSearchable] 属性有什么作用呢?

#region NoteID
public abstract class noteID : PX.Data.IBqlField { }
protected Guid? _NoteID;
[PXSearchable(SearchCategory.IN, "{0}: {1}", 
 new Type[] { typeof(InventoryItem.itemType), typeof(InventoryItem.inventoryCD) },
 new Type[] { typeof(InventoryItem.descr) }, 
 NumberFields = new Type[] { typeof(InventoryItem.inventoryCD) },
 Line1Format = "{0}{1}{2}", 
 Line1Fields = new Type[] { typeof(INItemClass.itemClassCD),
                            typeof(INItemClass.descr), 
                            typeof(InventoryItem.baseUnit) },
 Line2Format = "{0}", 
 Line2Fields = new Type[] { typeof(InventoryItem.descr) },
 WhereConstraint = typeof(Where<Current<InventoryItem.itemStatus>, 
                             NotEqual<InventoryItemStatus.unknown>>)
)]
[PXNote]
public virtual Guid? NoteID { get; set; }
#endregion

标签: acumatica

解决方案


PXSearchableAttribute用于在 Acumatica 的全文实体索引中包含记录的指定字段。它允许您在左上角的搜索框(现代 UI)中搜索该字段值。


推荐阅读