title: Load Email messages attached to transaction Suitescript 2.0
body: <p>I'm trying to load up all of the emails that have been sent from a transaction via SuiteScript 2.0.</p>
  
  <p>When I run </p>
  
  <pre><code>record.getSublists()
  </code></pre>
  
  <p>it returns the following:</p>
  
  <pre><code>["item","activeworkflows","workflowhistory","custom8","messages","contacts","activities","usernotes","systemnotes","mediaitem","links","cases","partners","events","calls","tasks"]
  </code></pre>
  
  <p>However, when I then try to run the following:</p>
  
  <pre><code>record.getSublist('messages');
  </code></pre>
  
  <p>I receive an error.</p>
  
  <p>I need to be able to check the date of the last email sent so I can determine whether or not to send a follow-up email. </p>