Call a custom quick search on a UD entry

Jose, 

This is my code on UD06 customization tools dialog:

object ret = ProcessCaller.InvokeAdapterMethod(oTrans.EpiBaseForm, "QuickSearchAdapter", "ShowQuickSearchForm", new object[] {oTrans.EpiBaseForm, "GTPartNum", true /* multi-select */, new DataTable() });
  
// user cancelled
if (ret == null) return;

// Perform a native lookup with the returned result
SearchOptions opts = new SearchOptions(SearchMode.AutoSearch);
opts.NamedSearch.WhereClauses.Add("UD02", string.Format("SysRowID='{0}'",ret.ToString()));
opts.DataSetMode = DataSetMode.RowsDataSet;
UD02Adapter _adapter = (UD02Adapter)csm.TransAdaptersHT["oTrans_adapter"];
_adapter.InvokeSearch(opts);
oTrans.NotifyAll();

The QuickSearch that I am trying to open is from UD02.


I manage to open the quick search form, then when I select the row I get this error:

error.png
error.png
Shared with Dropbox
Preview by Yahoo

 



Please help me!

Thanks

Hi,


Is it possible to call a quick search on a UD entry?

For example:

I have created a quick search entry for UD02 and now I want to call it from UD06.

I added a button and under this one I have used a simple search customization code:


e.g.  bool recSelected;

string whereClause = string.Empty;

System.Data.DataSet dsUD02Adapter = Ice.UI.FormFunctions.SearchFunctions.listLookup(this.oTrans, "UD02Adapter", out recSelected, true, whereClause);


The thing is that when I press that customized button, it does not see the quick search, but the regular one.

Is there like a QuickSearchFunction? I couldn't find it..


Any help would be highly appreciated!


Thanks!

Johnny

 



Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?

On Mon, Aug 15, 2016 at 3:56 PM, ionut.rus@... [vantage] <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p></p><p><span>Hi,</span></p><p><span><br></span></p><p><span>Is it possible to call a quick search on a UD entry?</span></p><p><span>For example:</span></p><p><span>I have created a quick search entry for UD02 and now I want to call it from UD06.</span></p><p><span>I added a button and under this one I have used a simple search customization code:</span></p><p><span><br></span></p><p><span>e.g. <span style="white-space:pre-wrap;">		</span></span>bool recSelected;</p><p><span style="white-space:pre-wrap;">		</span>string whereClause = string.Empty;</p><p><span style="white-space:pre-wrap;">		</span>System.Data.DataSet dsUD02Adapter = <span style="white-space:pre-wrap;">		</span>Ice.UI.FormFunctions. SearchFunctions.listLookup( this.oTrans, &quot;UD02Adapter&quot;, out recSelected, true, whereClause);</p><p><br></p><p>The thing is that when I press that customized button, it does not see the quick search, but the regular one.</p><p>Is there like a QuickSearchFunction? I couldn&#39;t find it..</p><p><br></p><p>Any help would be highly appreciated!</p><p><br></p><p>Thanks!</p><p>Johnny</p><p><span> </span></p><p></p>

</div>
 


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

Thank Jose, but it doesn't work.
I have added the custom assemblies related to QuickSearchAdapter, and it doesn't recognize it.
I am using Epicor10.1.400.7

 Error: CS0103 - line 117 (513) - The name 'Ë®QuickSearchAdapterË®' does not exist in the current context

It does work you have to have the correct using statements as well as the correct DLL'sÂ
you need to bring in the QuickSearchAdapter



Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?

On Mon, Aug 15, 2016 at 4:54 PM, ionut.rus@... [vantage] <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p>Thank Jose, but it doesn&#39;t work.</p><div>I have added the custom assemblies related to QuickSearchAdapter, and it doesn&#39;t recognize it.</div><div>I am using Epicor10.1.400.7</div><div><br></div><div> Error: CS0103 - line 117 (513) - The name &#39;ˮQuickSearchAdapterˮ&#39; does not exist in the current context<br></div><div><br></div><p></p>

</div><span>
 


<div style="color:rgb(255,255,255);min-height:0px;"></div>


still doesn't work..

using System;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Windows.Forms;
using Ice.BO;
using Ice.UI;
using Ice.Lib;
using Ice.Adapters;
using Ice.Lib.Customization;
using Ice.Lib.ExtendedProps;
using Ice.Lib.Framework;
using Ice.Lib.Searches;
using Ice.UI.FormFunctions;
using System.Collections

those are my using statements.

those are the custom assemblies that I have added:


"Doesn't work" isn't going to be very helpful... what do your code look like? what error are you getting?


Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?

On Mon, Aug 15, 2016 at 5:40 PM, ionut.rus@... [vantage] <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p></p><div>still doesn&#39;t work..</div><div><br></div><div>using System;</div><div>using System.ComponentModel;</div><div>using System.Data;</div><div>using System.Diagnostics;</div><div>using System.Windows.Forms;</div><div>using Ice.BO;</div><div>using Ice.UI;</div><div>using Ice.Lib;</div><div>using Ice.Adapters;</div><div>using Ice.Lib.Customization;</div><div>using Ice.Lib.ExtendedProps;</div><div>using Ice.Lib.Framework;</div><div>using Ice.Lib.Searches;</div><div>using Ice.UI.FormFunctions;</div><div>using System.Collections</div><div><br></div><div>those are my using statements.</div><div><br></div><div>those are the custom assemblies that I have added:</div><div><br></div><div><a rel="nofollow" target="_blank" href="https://www.dropbox.com/s/h8smdhc7f6ko1sf/quicksearchdll.png?dl=0">https://www.dropbox.com/s/ h8smdhc7f6ko1sf/ quicksearchdll.png?dl=0</a><br></div><div><br></div><p></p>

</div><span class="ygrps-yiv-2146811439">
 


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


Nevermind, the code is compiled successfully. It was a problem with the assemblies.
Now it works just fine!

Thank you Jose!!

Regards,
Johnny
Jose,

One more question if you don't mind:

Using that quick search code, how would you map search fields to application fields?

Thanks