title: Suitescript 1.0 - Get line item units in sales order
body: <p>I'm trying to get the units text for a sales order in suitescript 1.0 with nlapiGetLineItemText('item','units',i). This works for other select fields such as 'item', but 'units' always returns an empty string. nlapiGetLineItemValue('item','units',i) returns an integer that seems to correspond to specific unit types, but I'm not sure how it relates or if I can use this to extract the units text.</p>
  
  <p>Here's the code:</p>
  
  <pre><code>var lineCount = nlapiGetLineItemCount('item');
  var items = [];
  var itemObj = {};
  
  var invTypes = ['InvtPart','NonInvtPart','Assembly','Kit'];
  
  for(let i = 1; i &lt;= lineCount; i++) {
  
      let itemType = nlapiGetLineItemValue('item','itemtype',i);
  
      if(invTypes.indexOf(itemType) != -1) {
          let itemObj = {
              name:nlapiGetLineItemValue('item','description',i),
              qty:nlapiGetLineItemValue('item','quantity',i),
              units:nlapiGetLineItemValue('item','units',i),
              panel_qty:nlapiGetLineItemValue('item','custcol_panelqty',i),
              panel_ft:nlapiGetLineItemValue('item','custcol_feet',i),
              panel_in:nlapiGetLineItemValue('item','custcol_inch',i)
          };
          console.log(itemObj);
          items.push(itemObj);
      }
  }
  </code></pre>