title: Creating a Sales Order with an Item using Netsuite SuiteScript
body: <p>I am attempting to write a Restlet, using SuiteScript 2.0, for my company to create a new Sales Order. I found how to create a record.Type.Sales_Order and put in the minimums for now, but I have no idea on how to create an item for the Sales Order and include it in the SO so I can create the Sales Order.</p>
  
  <p>Here is what I have so far (in a GET):</p>
  
  <pre><code>   var salesOrder = record.create({
                  type: record.Type.SALES_ORDER, 
                  isDynamic: true,
                  defaultValues: {
                      entity: param.customer_id
                  } 
              });
  
  salesOrder.setValue('trandate', new Date()),
  salesOrder.setText('orderstatus','Pending Fulfillment'); 
  salesOrder.setValue('memo','Sales Order Generated from ' + param.customer_name);
  salesOrder.save();
  </code></pre>
  
  <p>Do I create a new record of an item type and then add it to the sales order before saving? I have looked though the help section in netsuite.com but can't find anything with creating items for a sales order.</p>
  
  <p>Thanks for any answers or places to look :)</p>