# SearchFunctions List Lookup does not return UD fields on UDTable?

**URL:** <https://www.epiusers.help/t/searchfunctions-list-lookup-does-not-return-ud-fields-on-udtable/44122>\
**Category:** Epicor ERP 10\
**Created:** [April 19, 2018, 9:27pm UTC](https://www.epiusers.help/t/searchfunctions-list-lookup-does-not-return-ud-fields-on-udtable/44122 "2018-04-19T21:27:47Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![JeffSanders](https://www.epiusers.help/user_avatar/www.epiusers.help/jeffsanders/32/11196_2.png) [@JeffSanders](https://www.epiusers.help/u/JeffSanders)\
**Post date:** [April 19, 2018, 9:27pm UTC](https://www.epiusers.help/t/searchfunctions-list-lookup-does-not-return-ud-fields-on-udtable/44122/1 "2018-04-19T21:27:47Z")

</div>

Epicor 10.1.400.18

bool RecordSelected;  
string whereClause;  
whereClause = ModeDate + " Is Null";  
DataSet dSet = SearchFunctions.listLookup(UD20Form, “UD20Adapter”, out RecordSelected, false, whereClause);

Should I be using another method to retrieve records from a UD Table? This returns the rows without the extended UD fields from the UD20\_UD table.

---

<div class="post-metadata">

**Author:** ![josecgomez](https://www.epiusers.help/user_avatar/www.epiusers.help/josecgomez/32/55731_2.png) [@josecgomez](https://www.epiusers.help/u/josecgomez)\
**Post date:** [April 19, 2018, 10:31pm UTC](https://www.epiusers.help/t/searchfunctions-list-lookup-does-not-return-ud-fields-on-udtable/44122/2 "2018-04-19T22:31:55Z")

</div>

ListLookup only returns the main fields on the table (get list)  
Use get rows or invoke search to get the whole dataset

-Jose

---

<div class="post-metadata">

**Author:** ![JeffSanders](https://www.epiusers.help/user_avatar/www.epiusers.help/jeffsanders/32/11196_2.png) [@JeffSanders](https://www.epiusers.help/u/JeffSanders)\
**Post date:** [April 20, 2018, 1:24pm UTC](https://www.epiusers.help/t/searchfunctions-list-lookup-does-not-return-ud-fields-on-udtable/44122/3 "2018-04-20T13:24:13Z")

</div>

Thanks Jose. Will do.

---

<div class="post-metadata">

**Author:** ![hkeric.wci](https://www.epiusers.help/user_avatar/www.epiusers.help/hkeric.wci/32/52019_2.png) [@hkeric.wci](https://www.epiusers.help/u/hkeric.wci)\
**Post date:** [April 22, 2018, 2:30pm UTC](https://www.epiusers.help/t/searchfunctions-list-lookup-does-not-return-ud-fields-on-udtable/44122/4 "2018-04-22T14:30:19Z")

</div>

In a Nutshell,

**In Epicor 9:**  
`System.Data.DataSet dsPartRevSearchAdapter = Ice.UI.FormFunctions.SearchFunctions.listLookup(this.oTrans, "PartRevSearchAdapter", out recSelected, false, whereClause);`

**In Epicor 10:**  
listLookup only gets the “core columns” it no longer gets the UD Columns by design.

So you have a few options… I use the **BOReader** instead of listLookup when doing simple reads… but there is also a catch.

GetList: WORKS! - BRINGS IN THE PART REV INFO WITH MY UD FIELDS POPULATED!  
`System.Data.DataSet dsPartRevSearchAdapter = _bor.GetList("Erp:BO:PartRevSearch", whereClause, "PartNum, RevisionNum, Character10, CheckBox02, CheckBox03, CheckBox04, Date01, Date02");`

GetList: DOES NOT WORK - BRINGS IN THE PART REV INFO BUT MY UD FIELDS REMAIN BLANK  
`System.Data.DataSet dsPartRevSearchAdapter = _bor.GetList("Erp:BO:PartRevSearch", whereClause, "");`

GetRows: Works gets my UD Fields etc…  
`System.Data.DataSet dsPartRevSearchAdapter = _bor.GetRows("Erp:BO:PartRevSearch", whereClause, "Character10, CheckBox02, CheckBox03, CheckBox04, Date01, Date02");`

When using the **BOReader.GetList** you “must” specify the columns you want. When doing **BOReader.GetRows** you can leave the columns “” and get all.

You are probably going to end up using either the AD/BO GetRows or CreateRuntimeSearch:

```
SearchOptions searchOptions = SearchOptions.CreateRuntimeSearch(whereClauses, DataSetMode.RowsDataSet);
adapterUD05.InvokeSearch(searchOptions);

```

**3 Examples:**

 ![Examples_3](https://epiusers.help/uploads/default/original/2X/9/9caaac400a73b8fab38f1ed2bd0408a640e881c8.jpg)

BOReader Gotchas!

 ![GetListGotchaMUSTSpecifyColumns](https://epiusers.help/uploads/default/original/2X/e/e260c58057b4bfa6ec3bfb74a98c572f974a0674.png)

---

<div class="post-metadata">

**Author:** ![Mark\_Wonsil](https://www.epiusers.help/user_avatar/www.epiusers.help/mark_wonsil/32/51594_2.png) [@Mark\_Wonsil](https://www.epiusers.help/u/Mark_Wonsil)\
**Post date:** [April 23, 2018, 11:07am UTC](https://www.epiusers.help/t/searchfunctions-list-lookup-does-not-return-ud-fields-on-udtable/44122/5 "2018-04-23T11:07:15Z")

</div>

Haso,

What’s the advantage of using a BOReader over a DynamicQuery with a BAQ?

Mark W.

---

<div class="post-metadata">

**Author:** ![rbucek](https://www.epiusers.help/user_avatar/www.epiusers.help/rbucek/32/28841_2.png) [@rbucek](https://www.epiusers.help/u/rbucek)\
**Post date:** [April 23, 2018, 1:01pm UTC](https://www.epiusers.help/t/searchfunctions-list-lookup-does-not-return-ud-fields-on-udtable/44122/6 "2018-04-23T13:01:18Z")

</div>

performance wise i think they’re about the same (assuming you’re bringing back a similar sized dataset) but the BO reader is far less code and you don’t have to build and maintain the BAQ… just my thoughts. The only disadvantage i can think of is you are limited to UI applications with the BO reader where you could use the BAQ approach in BPM’s as well. But how often would you need the same one in both?

---

<div class="post-metadata">

**Author:** ![Mark\_Wonsil](https://www.epiusers.help/user_avatar/www.epiusers.help/mark_wonsil/32/51594_2.png) [@Mark\_Wonsil](https://www.epiusers.help/u/Mark_Wonsil)\
**Post date:** [April 23, 2018, 1:15pm UTC](https://www.epiusers.help/t/searchfunctions-list-lookup-does-not-return-ud-fields-on-udtable/44122/7 "2018-04-23T13:15:16Z")

</div>

The reason I was asking is I’m doing a LOT of research on Testing Software and making software easier to upgrade. One of the points I will be talking about at Insights\* is eliminating dependencies wherever possible. If we decouple objects then they tend to upgrade easier and are easier to isolate for testing purposes. As this thread shows, the dependency on the specific UD### adapter broke the application when the behavior of that adapter changed. If this was a BAQ, the main risk would have been fields renamed or eliminated.

Also, as you mentioned, reuse for other situations (like REST or BPMs) become possible.

Mark W.

(\*Thursday, 9:05 AM)

---

<div class="post-metadata">

**Author:** ![rbucek](https://www.epiusers.help/user_avatar/www.epiusers.help/rbucek/32/28841_2.png) [@rbucek](https://www.epiusers.help/u/rbucek)\
**Post date:** [April 23, 2018, 4:17pm UTC](https://www.epiusers.help/t/searchfunctions-list-lookup-does-not-return-ud-fields-on-udtable/44122/8 "2018-04-23T16:17:33Z")

</div>

assuming they don’t change the dynamic query adapter lol, but all good thoughts, your presentation sounds interesting!

---

<div class="post-metadata">

**Author:** ![Mark\_Wonsil](https://www.epiusers.help/user_avatar/www.epiusers.help/mark_wonsil/32/51594_2.png) [@Mark\_Wonsil](https://www.epiusers.help/u/Mark_Wonsil)\
**Post date:** [April 23, 2018, 6:03pm UTC](https://www.epiusers.help/t/searchfunctions-list-lookup-does-not-return-ud-fields-on-udtable/44122/9 "2018-04-23T18:03:38Z")

</div>

> [@rbucek](#):
>
> assuming they don’t change the dynamic query adapter lol

+1 !!!

---

<div class="post-metadata">

**Author:** ![hkeric.wci](https://www.epiusers.help/user_avatar/www.epiusers.help/hkeric.wci/32/52019_2.png) [@hkeric.wci](https://www.epiusers.help/u/hkeric.wci)\
**Post date:** [July 3, 2018, 8:02pm UTC](https://www.epiusers.help/t/searchfunctions-list-lookup-does-not-return-ud-fields-on-udtable/44122/10 "2018-07-03T20:02:07Z")

</div>

I agree with @rbucek in addition less dependencies, just one less thing to worry about; if someone removes the BAQ or whatever. #Speed

But some folks are using the DynamicAdapter (BAQ) and building COM-zGetSomethingHere Helper BAQ’s, nothing wrong with that especially if you have Calculated Fields.
