Help with ARInvoiceAdapter.GetList - DataSetMode.ListDataSet Iss

I found the solution last night searcing this group:
Added statement "opts.PreLoadSearchFilter = whereClause;"

Thank you John and Jose for your assistance!


--- In vantage@yahoogroups.com, "zanniebelle" <rwatson@...> wrote:
>
> Thanks Jose, In reviewing the ARInvoiceAdapter in Object Explorer and in VS2010 debugging the InvcHeadList table does have a GroupID and Posted column, so one would expect that you could filter on them.
>
> I need to populate the ARInvoice.ARInvoiceList with invoices that belong to a specific group. Much like the framework populates the ARInvoice Entry screen when a user enters or selects a group Id.
>
> Many of the controls on that screen are bound to InvcHeadList not InvcHead.
>
> If I do a RowDataSet search using InvcHead the results returned are correct but ARInvoice.ARInvoiceList is not populated.
>
> Thanks!
>
>
>
> --- In vantage@yahoogroups.com, Jose Gomez <jose@> wrote:
> >
> > You can't do whereclauses on fields that are not available on the HeadList
> > which is a much shorter list of fields, replace your table with InvoiceHed
> > and also replace your datasetmode to DataSetMode.RowsDataSet
> >
> > See if that helps.
> >
> >
> > *Jose C Gomez*
> > *Software Engineer*
> > *
> > *
> > *checkout my new blog <http://www.usdoingstuff.com> *
> > *
> > *T: 904.469.1524 mobile
> > E: jose@
> > http://www.josecgomez.com
> > <http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
> > <http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
> > <http://www.josecgomez.com/professional-resume/>
> > <http://www.josecgomez.com/feed/>
> > <http://www.usdoingstuff.com>
> >
> > *Quis custodiet ipsos custodes?*
> >
> >
> >
> > On Wed, May 23, 2012 at 10:51 AM, zanniebelle <rwatson@> wrote:
> >
> > > **
> > >
> > >
> > >
> > >
> > > Thanks John, but I originally tried that with the same results. I thought
> > > that because I wanted the list I'd need to use InvcHeadList as the table to
> > > use. InvoiceHeadList is a table (the only one) in the
> > > ARInvoice.ARInvoiceList dataset.
> > >
> > > I assumed that when you want to get a RowsDataSet it uses
> > > ARInvoiceData.InvcHead, where InvcHead should be used, but with a
> > > ListDataSet it would use ARInvoiceList.InvcHeadList.
> > >
> > > I just tested it again using InvcHead and got the same results...all the
> > > records are returned.
> > >
> > > Thanks again for the reply!
> > >
> > >
> > > --- In vantage@yahoogroups.com, John Driggers <waffqle@> wrote:
> > > >
> > > > Change the 'InvcHeadList' to 'InvcHead' when you add the WC to the
> > > > hashtable.
> > > > You should be using the table name there. If you put something else in
> > > > there, Epicor looks for a table with that name, doesn't find anything and
> > > > your WC doesn't get applied.
> > > >
> > > >
> > > >
> > > > On Wed, May 23, 2012 at 9:46 AM, zanniebelle <rwatson@> wrote:
> > > >
> > > > > **
> > > > >
> > > > >
> > > > > Hi All,
> > > > >
> > > > > I'm having a problem getting the whereclause to work when returning
> > > list
> > > > > records. I've tried the following two methods and both have no effect
> > > on
> > > > > the results returned i.e. all records are returned.
> > > > >
> > > > > Note when returning rows from InvcHead (DataSetMode.RowsDataSet) just
> > > the
> > > > > expected records are returned using the same where clause.
> > > > >
> > > > > // method 1
> > > > > String whereClause = "GroupID = 'GM123456' AND Posted = false";
> > > > > System.Collections.Hashtable wcHash = new
> > > System.Collections.Hashtable(1);
> > > > > wcHash.Add("InvcHeadList", whereClause);
> > > > > SearchOptions opts = SearchOptions.CreateRuntimeSearch(wcHash,
> > > > > DataSetMode.ListDataSet);
> > > > > _arInvoiceAdapter.InvokeSearch(opts);
> > > > >
> > > > > // method 2
> > > > > String whereClause = "GroupID = 'GM123456' AND Posted = false";
> > > > > SearchOptions opts = new SearchOptions(SearchMode.AutoSearch);
> > > > > opts.NamedSearch.WhereClauses.Add("InvcHeadList", whereClause);
> > > > > bool morePages;
> > > > > DataSet lo_ds = _arInvoiceAdapter.GetList(opts, out morePages);
> > > > >
> > > > > Thanks in Advance!
> > > > >
> > > > > Ray
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > *John Driggers*
> > > > *High End Dev, System Design, Profit Drinking*
> > > > *
> > > > **:: 904.404.9233*
> > > > *:: waffqle@*
> > >
> > > > *:: NO FAXES*
> > > >
> > > > *
> > > >
> > > > *
> > > >
> > > >
> > > > [Non-text portions of this message have been removed]
> > > >
> > >
> > >
> > >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
Hi All,

I'm having a problem getting the whereclause to work when returning list records. I've tried the following two methods and both have no effect on the results returned i.e. all records are returned.

Note when returning rows from InvcHead (DataSetMode.RowsDataSet) just the expected records are returned using the same where clause.

// method 1
String whereClause = "GroupID = 'GM123456' AND Posted = false";
System.Collections.Hashtable wcHash = new System.Collections.Hashtable(1);
wcHash.Add("InvcHeadList", whereClause);
SearchOptions opts = SearchOptions.CreateRuntimeSearch(wcHash, DataSetMode.ListDataSet);
_arInvoiceAdapter.InvokeSearch(opts);

// method 2
String whereClause = "GroupID = 'GM123456' AND Posted = false";
SearchOptions opts = new SearchOptions(SearchMode.AutoSearch);
opts.NamedSearch.WhereClauses.Add("InvcHeadList", whereClause);
bool morePages;
DataSet lo_ds = _arInvoiceAdapter.GetList(opts, out morePages);


Thanks in Advance!

Ray
Change the 'InvcHeadList' to 'InvcHead' when you add the WC to the
hashtable.
You should be using the table name there. If you put something else in
there, Epicor looks for a table with that name, doesn't find anything and
your WC doesn't get applied.



On Wed, May 23, 2012 at 9:46 AM, zanniebelle <rwatson@...> wrote:

> **
>
>
> Hi All,
>
> I'm having a problem getting the whereclause to work when returning list
> records. I've tried the following two methods and both have no effect on
> the results returned i.e. all records are returned.
>
> Note when returning rows from InvcHead (DataSetMode.RowsDataSet) just the
> expected records are returned using the same where clause.
>
> // method 1
> String whereClause = "GroupID = 'GM123456' AND Posted = false";
> System.Collections.Hashtable wcHash = new System.Collections.Hashtable(1);
> wcHash.Add("InvcHeadList", whereClause);
> SearchOptions opts = SearchOptions.CreateRuntimeSearch(wcHash,
> DataSetMode.ListDataSet);
> _arInvoiceAdapter.InvokeSearch(opts);
>
> // method 2
> String whereClause = "GroupID = 'GM123456' AND Posted = false";
> SearchOptions opts = new SearchOptions(SearchMode.AutoSearch);
> opts.NamedSearch.WhereClauses.Add("InvcHeadList", whereClause);
> bool morePages;
> DataSet lo_ds = _arInvoiceAdapter.GetList(opts, out morePages);
>
> Thanks in Advance!
>
> Ray
>
>
>



--
*John Driggers*
*High End Dev, System Design, Profit Drinking*
*
**:: 904.404.9233*
*:: waffqle@...*
*:: NO FAXES*

*

*


[Non-text portions of this message have been removed]
Thanks John, but I originally tried that with the same results. I thought that because I wanted the list I'd need to use InvcHeadList as the table to use. InvoiceHeadList is a table (the only one) in the ARInvoice.ARInvoiceList dataset.

I assumed that when you want to get a RowsDataSet it uses ARInvoiceData.InvcHead, where InvcHead should be used, but with a ListDataSet it would use ARInvoiceList.InvcHeadList.

I just tested it again using InvcHead and got the same results...all the records are returned.

Thanks again for the reply!

--- In vantage@yahoogroups.com, John Driggers <waffqle@...> wrote:
>
> Change the 'InvcHeadList' to 'InvcHead' when you add the WC to the
> hashtable.
> You should be using the table name there. If you put something else in
> there, Epicor looks for a table with that name, doesn't find anything and
> your WC doesn't get applied.
>
>
>
> On Wed, May 23, 2012 at 9:46 AM, zanniebelle <rwatson@...> wrote:
>
> > **
> >
> >
> > Hi All,
> >
> > I'm having a problem getting the whereclause to work when returning list
> > records. I've tried the following two methods and both have no effect on
> > the results returned i.e. all records are returned.
> >
> > Note when returning rows from InvcHead (DataSetMode.RowsDataSet) just the
> > expected records are returned using the same where clause.
> >
> > // method 1
> > String whereClause = "GroupID = 'GM123456' AND Posted = false";
> > System.Collections.Hashtable wcHash = new System.Collections.Hashtable(1);
> > wcHash.Add("InvcHeadList", whereClause);
> > SearchOptions opts = SearchOptions.CreateRuntimeSearch(wcHash,
> > DataSetMode.ListDataSet);
> > _arInvoiceAdapter.InvokeSearch(opts);
> >
> > // method 2
> > String whereClause = "GroupID = 'GM123456' AND Posted = false";
> > SearchOptions opts = new SearchOptions(SearchMode.AutoSearch);
> > opts.NamedSearch.WhereClauses.Add("InvcHeadList", whereClause);
> > bool morePages;
> > DataSet lo_ds = _arInvoiceAdapter.GetList(opts, out morePages);
> >
> > Thanks in Advance!
> >
> > Ray
> >
> >
> >
>
>
>
> --
> *John Driggers*
> *High End Dev, System Design, Profit Drinking*
> *
> **:: 904.404.9233*
> *:: waffqle@...*
> *:: NO FAXES*
>
> *
>
> *
>
>
> [Non-text portions of this message have been removed]
>
You can't do whereclauses on fields that are not available on the HeadList
which is a much shorter list of fields, replace your table with InvoiceHed
and also replace your datasetmode to DataSetMode.RowsDataSet

See if that helps.


*Jose C Gomez*
*Software Engineer*
*
*
*checkout my new blog <http://www.usdoingstuff.com> *
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*



On Wed, May 23, 2012 at 10:51 AM, zanniebelle <rwatson@...> wrote:

> **
>
>
>
>
> Thanks John, but I originally tried that with the same results. I thought
> that because I wanted the list I'd need to use InvcHeadList as the table to
> use. InvoiceHeadList is a table (the only one) in the
> ARInvoice.ARInvoiceList dataset.
>
> I assumed that when you want to get a RowsDataSet it uses
> ARInvoiceData.InvcHead, where InvcHead should be used, but with a
> ListDataSet it would use ARInvoiceList.InvcHeadList.
>
> I just tested it again using InvcHead and got the same results...all the
> records are returned.
>
> Thanks again for the reply!
>
>
> --- In vantage@yahoogroups.com, John Driggers <waffqle@...> wrote:
> >
> > Change the 'InvcHeadList' to 'InvcHead' when you add the WC to the
> > hashtable.
> > You should be using the table name there. If you put something else in
> > there, Epicor looks for a table with that name, doesn't find anything and
> > your WC doesn't get applied.
> >
> >
> >
> > On Wed, May 23, 2012 at 9:46 AM, zanniebelle <rwatson@...> wrote:
> >
> > > **
> > >
> > >
> > > Hi All,
> > >
> > > I'm having a problem getting the whereclause to work when returning
> list
> > > records. I've tried the following two methods and both have no effect
> on
> > > the results returned i.e. all records are returned.
> > >
> > > Note when returning rows from InvcHead (DataSetMode.RowsDataSet) just
> the
> > > expected records are returned using the same where clause.
> > >
> > > // method 1
> > > String whereClause = "GroupID = 'GM123456' AND Posted = false";
> > > System.Collections.Hashtable wcHash = new
> System.Collections.Hashtable(1);
> > > wcHash.Add("InvcHeadList", whereClause);
> > > SearchOptions opts = SearchOptions.CreateRuntimeSearch(wcHash,
> > > DataSetMode.ListDataSet);
> > > _arInvoiceAdapter.InvokeSearch(opts);
> > >
> > > // method 2
> > > String whereClause = "GroupID = 'GM123456' AND Posted = false";
> > > SearchOptions opts = new SearchOptions(SearchMode.AutoSearch);
> > > opts.NamedSearch.WhereClauses.Add("InvcHeadList", whereClause);
> > > bool morePages;
> > > DataSet lo_ds = _arInvoiceAdapter.GetList(opts, out morePages);
> > >
> > > Thanks in Advance!
> > >
> > > Ray
> > >
> > >
> > >
> >
> >
> >
> > --
> > *John Driggers*
> > *High End Dev, System Design, Profit Drinking*
> > *
> > **:: 904.404.9233*
> > *:: waffqle@...*
>
> > *:: NO FAXES*
> >
> > *
> >
> > *
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>
>


[Non-text portions of this message have been removed]
Thanks Jose, In reviewing the ARInvoiceAdapter in Object Explorer and in VS2010 debugging the InvcHeadList table does have a GroupID and Posted column, so one would expect that you could filter on them.

I need to populate the ARInvoice.ARInvoiceList with invoices that belong to a specific group. Much like the framework populates the ARInvoice Entry screen when a user enters or selects a group Id.

Many of the controls on that screen are bound to InvcHeadList not InvcHead.

If I do a RowDataSet search using InvcHead the results returned are correct but ARInvoice.ARInvoiceList is not populated.

Thanks!



--- In vantage@yahoogroups.com, Jose Gomez <jose@...> wrote:
>
> You can't do whereclauses on fields that are not available on the HeadList
> which is a much shorter list of fields, replace your table with InvoiceHed
> and also replace your datasetmode to DataSetMode.RowsDataSet
>
> See if that helps.
>
>
> *Jose C Gomez*
> *Software Engineer*
> *
> *
> *checkout my new blog <http://www.usdoingstuff.com> *
> *
> *T: 904.469.1524 mobile
> E: jose@...
> http://www.josecgomez.com
> <http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
> <http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
> <http://www.josecgomez.com/professional-resume/>
> <http://www.josecgomez.com/feed/>
> <http://www.usdoingstuff.com>
>
> *Quis custodiet ipsos custodes?*
>
>
>
> On Wed, May 23, 2012 at 10:51 AM, zanniebelle <rwatson@...> wrote:
>
> > **
> >
> >
> >
> >
> > Thanks John, but I originally tried that with the same results. I thought
> > that because I wanted the list I'd need to use InvcHeadList as the table to
> > use. InvoiceHeadList is a table (the only one) in the
> > ARInvoice.ARInvoiceList dataset.
> >
> > I assumed that when you want to get a RowsDataSet it uses
> > ARInvoiceData.InvcHead, where InvcHead should be used, but with a
> > ListDataSet it would use ARInvoiceList.InvcHeadList.
> >
> > I just tested it again using InvcHead and got the same results...all the
> > records are returned.
> >
> > Thanks again for the reply!
> >
> >
> > --- In vantage@yahoogroups.com, John Driggers <waffqle@> wrote:
> > >
> > > Change the 'InvcHeadList' to 'InvcHead' when you add the WC to the
> > > hashtable.
> > > You should be using the table name there. If you put something else in
> > > there, Epicor looks for a table with that name, doesn't find anything and
> > > your WC doesn't get applied.
> > >
> > >
> > >
> > > On Wed, May 23, 2012 at 9:46 AM, zanniebelle <rwatson@> wrote:
> > >
> > > > **
> > > >
> > > >
> > > > Hi All,
> > > >
> > > > I'm having a problem getting the whereclause to work when returning
> > list
> > > > records. I've tried the following two methods and both have no effect
> > on
> > > > the results returned i.e. all records are returned.
> > > >
> > > > Note when returning rows from InvcHead (DataSetMode.RowsDataSet) just
> > the
> > > > expected records are returned using the same where clause.
> > > >
> > > > // method 1
> > > > String whereClause = "GroupID = 'GM123456' AND Posted = false";
> > > > System.Collections.Hashtable wcHash = new
> > System.Collections.Hashtable(1);
> > > > wcHash.Add("InvcHeadList", whereClause);
> > > > SearchOptions opts = SearchOptions.CreateRuntimeSearch(wcHash,
> > > > DataSetMode.ListDataSet);
> > > > _arInvoiceAdapter.InvokeSearch(opts);
> > > >
> > > > // method 2
> > > > String whereClause = "GroupID = 'GM123456' AND Posted = false";
> > > > SearchOptions opts = new SearchOptions(SearchMode.AutoSearch);
> > > > opts.NamedSearch.WhereClauses.Add("InvcHeadList", whereClause);
> > > > bool morePages;
> > > > DataSet lo_ds = _arInvoiceAdapter.GetList(opts, out morePages);
> > > >
> > > > Thanks in Advance!
> > > >
> > > > Ray
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > *John Driggers*
> > > *High End Dev, System Design, Profit Drinking*
> > > *
> > > **:: 904.404.9233*
> > > *:: waffqle@*
> >
> > > *:: NO FAXES*
> > >
> > > *
> > >
> > > *
> > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> >
> >
> >
>
>
> [Non-text portions of this message have been removed]
>