Code to return Character05 from Part table in UD table

Thank you Jose. I will give this a try!

Hello All,


The following code doesnt not seem to work correctly. It compiles succesfully but i get unhandle exception on the UD screen saying couldnt find the column Character05. Any help anyone?


PartNumberCB  =  cType(csm.GetNativeControlReference("93cbd527-3b46-479f-b78c-8c1ad8040e70"),EpiUltraCombo)

dsPart = Epicor.Mfg.UI.FormFunctions.SearchFunctions.listLookup(oTrans,"PartAdapter", recSelected, False,"ClassID = ""FG"" or ClassID = ""FG20"" ")

If (recSelected) Then

PartNumberCB.ValueMember = "PartNum"

PartNumberCB.DataSource = dsPart

PartNumberCB.DisplayMember = "Character05"

Dim fields As String() = New String() {"PartNum" , "Character05"}

PartNumberCB.SetColumnFilter(fields)

End if


I used this code with PartNum and it works like a charm. Not sure what i am missing. thank you!


Jose


PartNumberCB.DisplayMember = "Part.Character05"
?

Charlie Smith
ESSNER Manufacturing, L.P.
6651 Will Rogers Blvd.
Fort Worth, TX 76140
csmith@...<mailto:csmith@...>
ph: (817) 529-6165
fx: (817) 568-2625
[LOGO_Essner_Manufacturing]

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, March 18, 2015 3:53 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Code to return Character05 from Part table in UD table



Hello All,



The following code doesnt not seem to work correctly. It compiles succesfully but i get unhandle exception on the UD screen saying couldnt find the column Character05. Any help anyone?



PartNumberCB = cType(csm.GetNativeControlReference("93cbd527-3b46-479f-b78c-8c1ad8040e70"),EpiUltraCombo)

dsPart = Epicor.Mfg.UI.FormFunctions.SearchFunctions.listLookup(oTrans,"PartAdapter", recSelected, False,"ClassID = ""FG"" or ClassID = ""FG20"" ")

If (recSelected) Then

PartNumberCB.ValueMember = "PartNum"

PartNumberCB.DataSource = dsPart

PartNumberCB.DisplayMember = "Character05"

Dim fields As String() = New String() {"PartNum" , "Character05"}

PartNumberCB.SetColumnFilter(fields)

End if



I used this code with PartNum and it works like a charm. Not sure what i am missing. thank you!



Jose





[Non-text portions of this message have been removed]
Thanks Charlie. i tried that but still get the same error.

"Cannot find column: Character05
Parameter Name:Character05"

Are you on E10 by chance?

I was told by 'Support' that listLookup does not return UD fields....


You could bind that dsPart to a ultragrid and see what is being returned...

I am in Vantage 8.03..409C.

the thing is that if return the partnum field, it returns the parts
ListLookup traditionaly calls the GetList which only returns the fields you see on the Search Screen you'll have to switch to a method that does a GetRows to get UD field.


Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?

On Wed, Mar 18, 2015 at 5:01 PM, neverunmacron@... [vantage] <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p>I am in Vantage 8.03..409C.</p><div><br></div><div>the thing is that if return the partnum field, it returns the parts</div><p></p>

</div>
 


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

Still haven't been able to figure this out. Anyone else has an idea? thank you!
Jose
You can use a RunTime Search it allows you to determine whether you getList or GetRows dataset. Try this

PartAdapter ja = new PartAdapter(trans);
      ja.BOConnect();

      String whereClause = "ClassID = 'FG' or ClassID = 'FG20'";
      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);
      bool morePages;
      DataSet ds = ja.GetRows(so, out morePages);

      //Get Character 05 ds.Tables[0].Rows[0]["Character05"].ToString();




Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?

On Fri, Mar 20, 2015 at 1:37 PM, neverunmacron@... [vantage] <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p>Still haven&#39;t been able to figure this out. Anyone else has an idea? thank you!</p><div>Jose</div><p></p>

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


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