title: C# NetSuite WebServices: Get value from custom field in saved search (ItemSearchAdvanced)
body: <p>I'm using C# MVC to connect to NetSuite using their WebServices API.  I have some current code that calls a saved search of inventory items.  Here is the current code that is working perfectly:</p>
  
  <pre><code>ItemSearchAdvanced searchItems = new ItemSearchAdvanced();
  searchItems.savedSearchId = "128";
  SearchResult result = netSuiteSvc.search(searchItems);
  int totalRecords = 0;
  int processedRecords = 0;
  
  UpdateNetsuitePriceListModel returnObj = new UpdateNetsuitePriceListModel();
  returnObj.NewPriceList = new List&lt;NetSuitePriceListRecord&gt;();
  if (result.status.isSuccess)
  {
      SearchRow[] searchRows = result.searchRowList;
      if (searchRows != null &amp;&amp; searchRows.Length &gt;= 1)
      {
          for (int i = 0; i &lt; searchRows.Length - 1; i++)
          {
              ItemSearchRow itemRow = (ItemSearchRow)searchRows[i];
              if (itemRow.basic.itemId != null &amp;&amp; itemRow.basic.mpn != null &amp;&amp; itemRow.basic.basePrice != null &amp;&amp; itemRow.basic.salesDescription != null)
              {
                  returnObj.NewPriceList.Add(new NetSuitePriceListRecord()
                  {
                      ItemId = itemRow.basic.itemId[0].searchValue,
                      ManufacturerPartNumber = itemRow.basic.mpn[0].searchValue,
                      ContractPrice = Convert.ToDecimal(itemRow.basic.basePrice[0].searchValue),
                      Cost = CalculateProductCostForIngram(Convert.ToDecimal(itemRow.basic.basePrice[0].searchValue)),
                      Description = itemRow.basic.salesDescription[0].searchValue
                  });
                  processedRecords++;
              }
              totalRecords++;
          }
      }
      else
      {
          throw new Exception("NetSuite Part List Blank");
      }
  }
  else
  {
      throw new Exception("NetSuite Part List Search Failure");
  }
  </code></pre>
  
  <p>Now I have need to pull the itemId from a custom added field rather than the default itemId field.</p>
  
  <p>Obviously since this is a custom field it isn't a property of ItemSearchRowBasic.  It looks like instead of the property I can choose "customFieldList" which is an array of "SearchColumnCustomField".  If I choose an index for the array I can see that SearchColumnCustomField contains:</p>
  
  <ul>
  <li>customLabel</li>
  <li>internalId</li>
  <li>scriptId</li>
  </ul>
  
  <p>I imagine I should be able to get the internalId of the SearchColumnCustomField and somehow use that to get the search value for that custom column but I've had some trouble finding any examples that fit so far.</p>
  
  <p>This custom field is a free form text field added to all inventory items.</p>