title: How to insert data to a CRM 2011 entity using Javascript?
body: <p>I am quite sure that this is somehow a basic/stupid question but I just don't find the answer.</p>
  
  <p>How do I insert a new record to an entity using Javascript (which is called on an <code>onChange</code> event)?</p>
  
  <p>My aim is to insert 4 values read from an incident-form to a custom entity called <code>statuslog</code>.</p>
  
  <p>It's easy enough to read the four fields.</p>
  
  <pre><code>// Statuscode: "1st Level Support"
  var statuscodeTextValue = getPicklistValueText("statuscode");
  
  // Incidentid: "AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEEE"
  var incidentid = getGUIDOfCurrentRecord();
  
  // Ownerid: "AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEEF"
  var ownerid = getGUID("ownerid");
  
  //timestamp is "Fri Oct 12 16:50:34 UTC +0200 2012"
  var timestamp = new Date();
  </code></pre>
  
  <p>But what do I have to do next? A specific code example would be very much appreciated. :-)</p>