title: How can I use SuiteScript 2.0 to validate Transfer Order line quantity? Script does not seem to be initializing
body: <p>This same method has worked before to validate line level memo on an Inventory Adjustment, but for some reason this is not working. I do not believe it is initializing at all. </p>
  
  <p>My goal is to validate the quantity on the line of a Transfer Order to check if the quantity is 1. If the quantity is 1, show the message (and do not let the user proceed).</p>
  
  <p>Maybe it has something to do with Line Type on Transfer Orders?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>/**
  @NApiVersion 2.0
  @NScriptType ClientScript
  @NModuleScope Public
  */
  define([], function () {
   function showMessage(context){
    var message = "ERROR: Do not order single units"
    var quant = context.currentRecord.getCurrentSublistValue({
     sublistId:'item',
     fieldId:'quantity',
    });
    
    if (quant == 1) {
     alert(message);
    } 
          else {
          return true;
      }
  }
   
   return {
    validateLine: showMessage
   };
  });</code></pre>
  </div>
  </div>
  </p>