title: TypeError: Cannot call method 'clone' of undefined
body: <p>Jscript noob, so apologies as this is probably a silly question.</p>
  
  <p>Trying to run some cloud code to clone an object. I don't understand why it is saying the object is undefined. All I wanted to do was copy an object without cycling through the members manually. The Bid object is valid and returned from a query.  I 'included' the creditTransaction on the query, so it was deep fetched.</p>
  
  <pre><code>  var bid = results[i];
    var oldCredit = bid.get("creditTransaction");
    var creditTransaction = oldCredit.clone();
  </code></pre>
  
  <p>Thanks!</p>