Acumatica 在选择器中搜索

Acumatica 在选择器中搜索,acumatica,Acumatica,acumatica selector中的默认搜索是contains,当在自定义页面的selector中一次性输入数据时,它会创建批量问题。是否有一种方法可以改变开始时的行为而不是包含 更新 我已经尝试了以下代码,它是基于start with进行过滤的,但没有显示选择器中的所有列 #region Custom Selector Attribute public class LotSerialNbrSelectionAttribute : PXCustomSelectorAttribute {

acumatica selector中的默认搜索是contains,当在自定义页面的selector中一次性输入数据时,它会创建批量问题。是否有一种方法可以改变开始时的行为而不是包含

更新

我已经尝试了以下代码,它是基于start with进行过滤的,但没有显示选择器中的所有列

#region Custom Selector Attribute
public class LotSerialNbrSelectionAttribute : PXCustomSelectorAttribute
{
    public LotSerialNbrSelectionAttribute(Type type, Type[] fieldlist)

        : base(type,fieldlist)
    {

    }
    protected virtual IEnumerable GetRecords()
    {
        PXView view = new PXView(this._Graph, !this._DirtyRead, this._Select);
        PXCache lotSerCach = this._Graph.Caches[typeof(InfoLotSerialFilter)];
        List<object> result = new List<object>();
        Int32 totalrow = 0;
        Int32 startrow = PXView.StartRow;
        result = view.Select(PXView.Currents, PXView.Parameters,
                   PXView.Searches, PXView.SortColumns, PXView.Descendings,
                   PXView.Filters, ref startrow, PXView.MaximumRows, ref totalrow);
        PXView.StartRow = 0;
        string searchval = string.Empty;
        if(PXView.Filters.Length > 0)
            searchval = PXView.Filters[0].Value.ToString();

        InfoLotSerialFilter searchrow = lotSerCach.Current as InfoLotSerialFilter;
        foreach(PXResult<INLotSerialStatus> line in result)
        {

            INLotSerialStatus row = line;

            if(string.IsNullOrEmpty(searchval))
                yield return row;
            else
            {
                if(row.LotSerialNbr.StartsWith(searchval))
                    yield return row;
            }
        }
    }
}
#endregion
调用属性

结果


InventoryID&SiteID未显示在选择浏览器中

我已尝试了下面给出的修改代码,效果良好

#region Custom Selector Attribute
public class LotSerialNbrSelectionAttribute : PXCustomSelectorAttribute
{
    public LotSerialNbrSelectionAttribute(Type type, Type[] fieldlist)

        : base(type, typeof(INLotSerialStatus.inventoryID), typeof(INLotSerialStatus.lotSerialNbr), typeof(INSite.siteCD))
    {

    }
    protected virtual IEnumerable GetRecords()
    {
        PXView view = new PXView(this._Graph, !this._DirtyRead, this._Select);
        string searchval = string.Empty;
        if (PXView.Filters.Length > 0)
            searchval = PXView.Filters[0].Value.ToString();
        PXView.Filters.Clear();
        //PXCache lotSerCach = this._Graph.Caches[typeof(InfoLotSerialFilter)];
        List<object> result = new List<object>();
        Int32 totalrow = 0;
        Int32 startrow = PXView.StartRow;
        result = view.Select(PXView.Currents, PXView.Parameters,
                   PXView.Searches, PXView.SortColumns, PXView.Descendings,
                   PXView.Filters, ref startrow, 10000, ref totalrow);
        PXView.StartRow = 0;
        foreach(PXResult<INLotSerialStatus,INSite> line in result)
        {

            INLotSerialStatus row = line;

            if(string.IsNullOrEmpty(searchval))
                yield return line;
            else
            {
                if(row.LotSerialNbr.StartsWith(searchval))
                    yield return line;
            }
        }
    }
}
#endregion
#region Custom Selector Attribute
public class LotSerialNbrSelectionAttribute : PXCustomSelectorAttribute
{
    public LotSerialNbrSelectionAttribute(Type type, Type[] fieldlist)

        : base(type, typeof(INLotSerialStatus.inventoryID), typeof(INLotSerialStatus.lotSerialNbr), typeof(INSite.siteCD))
    {

    }
    protected virtual IEnumerable GetRecords()
    {
        PXView view = new PXView(this._Graph, !this._DirtyRead, this._Select);
        string searchval = string.Empty;
        if (PXView.Filters.Length > 0)
            searchval = PXView.Filters[0].Value.ToString();
        PXView.Filters.Clear();
        //PXCache lotSerCach = this._Graph.Caches[typeof(InfoLotSerialFilter)];
        List<object> result = new List<object>();
        Int32 totalrow = 0;
        Int32 startrow = PXView.StartRow;
        result = view.Select(PXView.Currents, PXView.Parameters,
                   PXView.Searches, PXView.SortColumns, PXView.Descendings,
                   PXView.Filters, ref startrow, 10000, ref totalrow);
        PXView.StartRow = 0;
        foreach(PXResult<INLotSerialStatus,INSite> line in result)
        {

            INLotSerialStatus row = line;

            if(string.IsNullOrEmpty(searchval))
                yield return line;
            else
            {
                if(row.LotSerialNbr.StartsWith(searchval))
                    yield return line;
            }
        }
    }
}
#endregion