Epicor9 - 如何过滤 UDAdapter 搜索中显示的列 window

Epicor9 - How to filter columns display in UDAdapter search window

我使用自定义向导创建了以下 SearchOnUDAdapterShowDialog() 函数,它允许用户搜索 UD table 内容。问题是搜索结果显示 UD table 中的所有列。我只需要显示几个相关的列,并将默认列名称更改为用户友好的名称。

private void SearchOnUD100AdapterShowDialog()
{
    // Wizard Generated Search Method
    // You will need to call this method from another method in custom code
    // For example, [Form]_Load or [Button]_Click

    bool recSelected;
    string whereClause = string.Empty;
    System.Data.DataSet dsUD100Adapter = Epicor.Mfg.UI.FormFunctions.SearchFunctions.listLookup(this.oTrans, "UD100Adapter", out recSelected, true, whereClause);
    if (recSelected)
    {
        System.Data.DataRow adapterRow = dsUD100Adapter.Tables[0].Rows[0];

        // Map Search Fields to Application Fields
        EpiDataView edvVendorDetail = ((EpiDataView)(this.oTrans.EpiDataViews["VendorDetail"]));
        System.Data.DataRow edvVendorDetailRow = edvVendorDetail.CurrentDataRow;
        if ((edvVendorDetailRow != null))
        {
            edvVendorDetailRow.BeginEdit();
            edvVendorDetailRow["ShortChar09"] = adapterRow["Key1"];
            edvVendorDetailRow.EndEdit();
        }
    }
}

感谢您的帮助。 谢谢

尝试在调用 listLookup 之前调用它:

EpiSearchBase adapterSearchForm = ((Epicor.Mfg.UI.Adapters.UD100Adapter)oTrans_adapter).SearchForm;     
adapterSearchForm.ClearEpiSearchColumns();

// Paramters: Data Column Name, Column Header Text, Width, Is Result, Position
adapterSearchForm.SetEpiSearchColumn(new EpiSearchColumn("Key1", "Alteration Fee Type", -1, true, 0), true);        
adapterSearchForm.SetEpiSearchColumn(new EpiSearchColumn("Character01", "Description", -1, false, 1), true);