title: Search Customer by custom field in Netsuite
body: <p>I was able to make the api work in php and search customer by internal id.
  However i have a scenario, where i'll be searching a customer by a custom field.
  Under Customer and it has a custom tab contains multiple domain name and domain details.</p>
  
  <p>For example : </p>
  
  <p>Main search criteria : Domain Name</p>
  
  <p>How is this possible in netsuite php api? Much appreciated for any help. im only newbie to NetSuite.
  How will i modify this sample code to search by custom field?</p>
  
  <pre><code>$service = new NetSuiteService();
  $request = new GetRequest();
  $request-&gt;baseRef = new RecordRef();
  $request-&gt;baseRef-&gt;internalId = "1780";
  $request-&gt;baseRef-&gt;type = "customer";
  $getResponse = $service-&gt;get($request);
  
  if (!$getResponse-&gt;readResponse-&gt;status-&gt;isSuccess) {
      echo "GET ERROR";
  } else {
      $customer = $getResponse-&gt;readResponse-&gt;record;
      //var_dump($customer);
      echo "GET SUCCESS, customer:";
      echo "\nCompany name: ". $customer-&gt;companyName;
      echo "\nInternal Id: ". $customer-&gt;internalId;
      echo "\nEmail: ". $customer-&gt;email;
      echo "\nCustomerID: ". $customer-&gt;firstName;
  }
  </code></pre>
  
  <p>OK, I'm trying to get the custom record of all domains base from egrubaugh360.</p>
  
  <pre><code>$service = new NetSuiteService();
  $request = new GetRequest();
  
  $request-&gt;baseRef = new CustomRecordRef();
  $request-&gt;baseRef-&gt;internalId = "47";
  //$request-&gt;baseRef-&gt;externalId = "xxxx";
  $request-&gt;baseRef-&gt;typeId = "custom_list_domains";
  
  $getResponse = $service-&gt;get($request);
  
  var_dump($getResponse);
  
  if (!$getResponse-&gt;readResponse-&gt;status-&gt;isSuccess) {
      echo "GET ERROR";
  } else {
      var_dump($getResponse-&gt;readResponse-&gt;record);
      echo "GET SUCCESS";
  }
  </code></pre>
  
  <p>I'm not sure what to put in "typeId", what exactly is the type to put? It gives me error "Invalid custom record type key"</p>
  
  <pre><code>object(GetResponse)#8 (1) { ["readResponse"]=&gt; object(ReadResponse)#9 (2) { ["status"]=&gt; object(Status)#10 (2) { ["statusDetail"]=&gt; array(1) { [0]=&gt; object(StatusDetail)#11 (3) { ["code"]=&gt; string(26) "INVALID_CSTM_RCRD_TYPE_KEY" ["message"]=&gt; string(31) "Invalid custom record type key." ["type"]=&gt; string(5) "ERROR" } } ["isSuccess"]=&gt; bool(false) } ["record"]=&gt; NULL } }
  </code></pre>