Acumatica中的可搜索用户定义字段
我最近在StockItem中添加了一些用户定义的字段,在一些记录中添加了值,然后尝试按值搜索它们。不幸的是,搜索引擎不知道我的UDF值Acumatica中的可搜索用户定义字段,acumatica,Acumatica,我最近在StockItem中添加了一些用户定义的字段,在一些记录中添加了值,然后尝试按值搜索它们。不幸的是,搜索引擎不知道我的UDF值 有没有办法让用户定义的字段可搜索?是的,正如Brian指出的那样,我们需要为该特定DAC的NoteID字段添加一个PXSearchable属性。下面的代码来自SOOrder DAC文件,它可能会帮助您实现您的要求 #region NoteID public abstract class noteID : PX.Data.BQL.BqlGuid.F
有没有办法让用户定义的字段可搜索?是的,正如Brian指出的那样,我们需要为该特定DAC的NoteID字段添加一个PXSearchable属性。下面的代码来自SOOrder DAC文件,它可能会帮助您实现您的要求
#region NoteID
public abstract class noteID : PX.Data.BQL.BqlGuid.Field<noteID> { }
protected Guid? _NoteID;
[**PXSearchable**(SM.SearchCategory.SO, "{0}: {1} - {3}", new Type[] { typeof(SOOrder.orderType), typeof(SOOrder.orderNbr), typeof(SOOrder.customerID), typeof(Customer.acctName) },
new Type[] { typeof(SOOrder.customerRefNbr), typeof(SOOrder.customerOrderNbr), typeof(SOOrder.orderDesc) },
NumberFields = new Type[] { typeof(SOOrder.orderNbr) },
Line1Format = "{0:d}{1}{2}{3}", Line1Fields = new Type[] { typeof(SOOrder.orderDate), typeof(SOOrder.status), typeof(SOOrder.customerRefNbr), typeof(SOOrder.customerOrderNbr) },
Line2Format = "{0}", Line2Fields = new Type[] { typeof(SOOrder.orderDesc) },
MatchWithJoin = typeof(InnerJoin<Customer, On<Customer.bAccountID, Equal<SOOrder.customerID>>>),
SelectForFastIndexing = typeof(Select2<SOOrder, InnerJoin<Customer, On<SOOrder.customerID, Equal<Customer.bAccountID>>>>)
)]
[PXNote(new Type[0], ShowInReferenceSelector = true, Selector = typeof(
Search2<
SOOrder.orderNbr,
LeftJoinSingleTable<Customer,
On<SOOrder.customerID, Equal<Customer.bAccountID>,
And<Where<Match<Customer, Current<AccessInfo.userName>>>>>>,
Where<
Customer.bAccountID, IsNotNull,
Or<Exists<
Select<
SOOrderType,
Where<
SOOrderType.orderType, Equal<SOOrder.orderType>,
And<SOOrderType.aRDocType, Equal<ARDocType.noUpdate>>>>>>>,
OrderBy<
Desc<SOOrder.orderNbr>>>))]
public virtual Guid? NoteID
{
get
{
return this._NoteID;
}
set
{
this._NoteID = value;
}
}
#endregion
#区域注释ID
公共抽象类noteID:PX.Data.BQL.BqlGuid.Field{}
受保护的Guid_NoteID;
[**PXSearchable**(SM.SearchCategory.SO,“{0}:{1}-{3}”,新类型[]{typeof(SOOrder.orderType),typeof(SOOrder.orderNbr),typeof(SOOrder.customerID),typeof(Customer.acctName)},
新类型[]{typeof(SOOrder.customerRefNbr),typeof(SOOrder.customerOrderNbr),typeof(SOOrder.orderDesc)},
NumberFields=新类型[]{typeof(SOOrder.orderNbr)},
Line1Format=“{0:d}{1}{2}{3}”,Line1Fields=新类型[]{typeof(SOOrder.orderDate),typeof(SOOrder.status),typeof(SOOrder.customerRefNbr),typeof(SOOrder.customerOrderNbr)},
Line2Format=“{0}”,Line2Fields=新类型[]{typeof(SOOrder.orderDesc)},
MatchWithJoin=typeof(InnerJoin),
SelectForFastIndexing=typeof(Select2)
)]
[PXNote(新类型[0],ShowInReferenceSelector=true,Selector=typeof(
搜索2<
SOOrder.orderNbr,
LeftJoinSingleTable,
在哪里<
Customer.bAccountID,不为空,
或>>>>,,
订货人<
描述>>)]
公共虚拟Guid?注
{
得到
{
返回此。\u NoteID;
}
设置
{
这是。_NoteID=值;
}
}
#端区
搜索引擎不会自动识别您的自定义字段,但您可以自定义NoteID字段以更新PXSearchable属性并识别您的字段。如果您已经这样做了,是否可以发布用于定义通用搜索的自定义NoteID字段定义(特别是PXSearchable属性)?我已经成功地使DAC扩展的一个字段可以在universal search中搜索。