Attachment Search

Thanks a lot Jose, that worked great.
Hi All,

Is there a business object that I can use to search for attachments on a job without using DynamicQuery? I need to return a list of attachments for job material but DynamicQuery does not work in V8.

Thanks,

-Ted
What do you mean Dynamic Query doesn't work in 8? Its just a BAQ it should work... Are you getting an error?



Jose C Gomez
Software Engineer



T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com

     Â


Quis custodiet ipsos custodes?


On Tue, Dec 3, 2013 at 9:31 AM, <tkoch77@...> wrote:

Â
<div>
  
  
  <p>Hi All,<br><br>Is there a business object that I can use to search for attachments on a job without using DynamicQuery? I need to return a list of attachments for job material but DynamicQuery does not work in V8.<br>


Thanks,

-Ted

</div>
 


<div style="color:#fff;min-height:0;"></div>

In V8 I try to use this code:


        Dim dq As DynamicQuery
        Dim dqds As DynamicQueryDataSet = dq.GetByID("100-Qry1")


but get the following error:


Value of type 'Epicor.Mfg.BO.QueryDesignDataSet' cannot be converted to 'Epicor.Mfg.BO.DynamicQueryDataSet'.


The same code does not throw this error in E9.

Right ,
The DynamicQuery adpater returns a different data type in 8 than in 9 but it still works simply change it from QueryDesignDataSet to DynamicQueryDataSet as it suggests.


Jose C Gomez
Software Engineer


T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com

     Â


Quis custodiet ipsos custodes?


On Tue, Dec 3, 2013 at 9:48 AM, <tkoch77@...> wrote:

Â
<div>
  
  
  <p></p><p>In V8 I try to use this code:</p><p><br></p><p style="font-style:normal;font-size:13px;background-color:transparent;font-family:arial, helvetica, clean, sans-serif;">Â Â Â Â Â Â Â  Dim dq As DynamicQuery<br>Â Â Â Â Â Â Â  Dim dqds As DynamicQueryDataSet = dq.GetByID(&quot;100-Qry1&quot;)<br>


but get the following error:


Value of type 'Epicor.Mfg.BO.QueryDesignDataSet' cannot be converted to 'Epicor.Mfg.BO.DynamicQueryDataSet'.


The same code does not throw this error in E9.

</div>
 


<div style="color:#fff;min-height:0;"></div>

The DynamicQuery BO method Execute expects type DynamicQueryDataSet though.
You just ahve to do a bit of magic
    Dim dq As New Epicor.Mfg.BO.DynamicQuery(_session.ConnectionPool)
    Dim qds As Epicor.Mfg.BO.QueryDesignDataSet = dq.GetByID("YourQuery")
    Dim dqds As Epicor.Mfg.BO.DynamicQueryDataSet = New Epicor.Mfg.BO.DynamicQueryDataSet()
    dqds.Merge(qds, True, MissingSchemaAction.Ignore)

    dqds.QueryWhereItem(0).RValue = "Myval"


    dq.Execute(dqds)



Jose C Gomez
Software Engineer


T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com

     Â


Quis custodiet ipsos custodes?


On Tue, Dec 3, 2013 at 10:16 AM, <tkoch77@...> wrote:

Â
<div>
  
  
  <p>The DynamicQuery BO method Execute expects type DynamicQueryDataSet though.</p>

</div>
 


<div style="color:#fff;min-height:0;"></div>

I'll give it a try, thanks Jose.