title: Netsuite - Set Line Item Value
body: <p>I am trying to figure out how to set a custom value item from the value of another field on the item field. I am not getting any errors, but it is not changing the value.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>function validatePOLineItem(type){
     if(type == 'item'){
       for (var i = 0; i &lt;= nlapiGetLineItemCount('item'); i++) {
       // Get the value for amount on the item line
       var amount = nlapiGetCurrentLineItemValue('item', 'amount');
       // Get the value for the PO Amount on the item line
       var po_amount = nlapiGetCurrentLineItemValue('item', 'custcol_po_amount');
       // Set PO Amount equal to Amount on the item line
       nlapiSetCurrentLineItemValue('item', po_amount, amount);
      }
     }
  }
  </code></pre>