title: Netsuite Suite Script 2.0 getSelectOptions function on record field does not exist
body: <p>I am trying to get the values from the <code>Status</code> select field on a customer record so that I can get the proper <code>internal id</code>. I should note that I am trying to create a new customer and I am at the point where I need to set the entitystatus. </p>
  
  <p>According to the documentation for Suite Script 2.0 there is a method called getSelectOptions() on the Field object of a record. For some reason when I try to call that method I get an error saying that it does not exist. </p>
  
  <p>Below is my code for my restlet:</p>
  
  <pre><code>define([ 'N/record', 'N/search' ],
  function(record, search) {
      function doPost(requestBody) {
          var custRec = record.create({
              type : record.Type.CUSTOMER
          });
  
          var statusRec = custRec.getField({
              fieldId : 'entitystatus'
          });
  
          var status = statusRec.getSelectOptions({
              filter : 'CUSTOMER-Closed Won',
              operator : 'is'
          });
  
          return JSON.stringify(status);
      }
  }
  </code></pre>
  
  <p>If I return statusRec as a JSON string I get back <code>{"id":"entitystatus","label":"Status","type":"select"}</code></p>
  
  <p>But when I call <code>statusRec.getSelectOptions(options)</code> it returns error code: <code>JS_EXCEPTION error message:TypeError: Cannot find function getSelectOptions in object Field.</code></p>
  
  <p>Can anyone tell me what I am doing wrong? Maybe there is a better way to do what I want without hard coding the internal ids.</p>