title: NetSuite SuiteScript 2.0 : getSublistValue() Not Returning Value
body: <p>Unfortunately, it appears that when you create an Invoice from a custom transaction, NetSuite doesn't populate the native 'createdfrom' field. My attempt to work-around the issue by creating a custom reference field (i.e. <code>custbody_invoicecreatedfrom</code>) results in the <code>getSublistValue()</code> function returning an empty result, even through the internal ID is displayed correctly on the apply sublist line of the payment (XML).  I tried using <code>getSublistText()</code> as well, but that didn't work either. I have no problem getting the native sublist values (i.e. record browser), but the custom field will not return a value. Any suggestions?</p>
  <pre><code>//Loop through all of the Invoices Applied to the Payment
  for (var k = 0; k &lt; invoiceCount; k++) {
      var invoiceCreatedFrom = paymentSubmitted.getSublistValue({
      sublistId: 'apply',
      fieldId: 'custbody_invoicecreatedfrom',
      line: k
  });
  </code></pre>