Joe
I believe you have to use the Wareclauses fromt he opts
String whereClause = "ProdCode = 'BX6'";
System.Collections.Hashtable wcHash = new System.Collections.Hashtable(1);
wcHash.Add("Part",whereClause);
SearchOptions so = new SearchOptions(SearchMode.AutoSearch);
so.DataSetMode = DataSetMode.RowsDataSet;
so.NamedSearch.WhereClauses.Add(wcHash, whereClause);
DataSet ds = part.GetList(so, out morep);Â
On Wed, Jan 20, 2016 at 7:09 AM, Bernie Walker bwalker@... [vantage] <vantage@yahoogroups.com> wrote:Â<div> <p>Hi Joe,
I have found it easier to use BAQs and dynamic queries in my web based lookup screens than using the BO's in 10
Once I have the data I want in a dataset, then I call the methods to do updates or whatever.
Bernie.
-----Original Message-----
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Tuesday, January 19, 2016 5:06 PM
To: vantage@yahoogroups.com
Subject: [Vantage] E10: How to filter GetList/GetRows
Hi All,
I am trying to use the GetList method of PartAdapter to return just those part numbers where ProdCode is equal to a certain value.
I am doing this from an external app and I’m testing the code below in VS2013.
When testing, the message box at the end gives me a count which represents all the part numbers in my database so it appears the PreLoadSearchFilter is not working.
How do I properly pass a criteria to the GetList method?
Here is what I have:
Session EpiSession = new Session("xxxx", "xxxx", Session.LicenseType.Default, @"C:\Epicor\ERP10.0ClientTest\Client\config\ERP10.sysconfig");
ILauncher EpiLaunch = new ILauncher(EpiSession);
PartAdapter part = new PartAdapter(EpiLaunch);
part.BOConnect();
bool morep;
Ice.Lib.Searches.SearchOptions opts = new Ice.Lib.Searches.SearchOptions(Ice.Lib.Searches.SearchMode.AutoSearch);
opts.DataSetMode = Ice.Lib.Searches.DataSetMode.ListDataSet;
opts.PreLoadSearchFilter = "ProdCode = 'BX6'";
DataSet ds = part.GetList(opts, out morep);
MessageBox.Show(ds.Tables["PartList"].Rows.Count.ToString());
part.Dispose();
part = null;
EpiLaunch = null;
EpiSession.Dispose();
EpiSession = null;
[cid:f9d203.png@7afcd2b7.46bbd692]
Joe Rojas
Director of Information Technology
(781) 408-9278 Mobile
(781) 573-0291 Local
(781) 232-5191 Fax
[http://matsinc.com/images/e-mail-signatures/tagline.jpg]
[http://matsinc.com/images/e-mail-signatures/graphics/logo_matsinc.png]<http://matsinc.com> [http://matsinc.com/images/e-mail-signatures/graphics/icon_twitter.png] <http://twitter.com/Mats_Inc> [http://matsinc.com/images/e-mail-signatures/graphics/icon_facebook.png] <http://www.facebook.com/commercial.flooring> [http://matsinc.com/images/e-mail-signatures/graphics/icon_youtube.png] <http://www.youtube.com/user/MatsIncTV> [http://matsinc.com/images/e-mail-signatures/graphics/icon_pinterest.png] <http://www.pinterest.com/contractfloors/> [http://matsinc.com/images/e-mail-signatures/graphics/icon_blog.png] <http://matsinc.com/blog>
[Non-text portions of this message have been removed]
Posted by: Joe Rojas <jrojas@…>
Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/links
------------------------------------
Yahoo Groups Links
</div> <div style="color:rgb(255,255,255);min-height:0px;"></div>





