This topic contains 2 replies, has 0 voices, and was last updated by karenn 8 years, 9 months ago.

  • Author
    Posts
  • #6791

    karenn

    Hello,

    We have a saved search that includes a couple of custom fields as columns. We are trying to write a SuiteTalk C# program to use this saved search and display the saved search results on the screen. Fr various reasons we need to do this outside of NetSuite.

    We have no problem doing this until we get the columns in the saved search that are from custom fields. We cannot figure out how to get the values from these columns. Is this possible and if so how.

    we are using

    foreach (ItemSearchRow itmSearchRow in searchResult.searchRowList)

    {

    string partnum = “”;

    partnum = itmSearchRow.basic.itemId[0].searchValue;

    }

    to get the standard item id value but have no idea how to get the custom field value.

    Thanks!

    Karen
    This is a cached copy. Click here to see the original post.

  • #6792

    roberth

    here is a bit of code we use to crawl search results:

    PHP Code:

    if (row.basic.customFieldList != null)
    {
           foreach (SearchColumnCustomField custField in row.basic.customFieldList)      
           {          
               if (custField is SearchColumnStringCustomField)          
               {              
                   SearchColumnStringCustomField stringCustField = (SearchColumnStringCustomField)custField;
                   if (stringCustField.scriptId.Equals(“custbody_edi_country”)) tpCountry = stringCustField.searchValue; 

    of course there are other search column types, but the idea is the same. Good Luck!

  • #6793

    karenn

    Thanks! That will work

You must be logged in to reply to this topic.