title: NetSuite Javascript Error: org.mozilla.javascript.Undefined@26e0a9d9
body: <pre><code> function updatetaxcode()
  {
  var record = nlapiGetNewRecord();
  nlapiLogExecution('DEBUG','id', record);
  
  var tranType = record.getRecordType();
  nlapiLogExecution('DEBUG','type', tranType);
  
  var loc = "2315"
  
  
  var numLines = nlapiGetLineItemCount('item');
  nlapiLogExecution('DEBUG','count', numLines);
  
  for (var i=1; i&lt;= numLines; i++)
  {
  var lineLoc = nlapiGetLineItemValue('item', 'taxcode', i);
  
   nlapiSetLineItemValue('item', 'taxcode', i, loc);
    }
     }
  </code></pre>
  
  <p>The script is setting the value on <strong>taxcode</strong> field and working fine. When I see under workflow logs, I see the error :</p>
  
  <blockquote>
    <p>"Script result value:  org.mozilla.javascript.Undefined@26e0a9d9".</p>
  </blockquote>
  
  <p>This is a custom workflow action script. </p>