title: create a PhoneCall record in Crm using Javascript
body: <p>When I try to create a PhoneCall record in Crm using Javascript, I got following error message, I cannot figure out the reason, any help?</p>
  
  <pre><code> {
      "readyState": 4,
      "responseText": "{\r\n\"error\": {\r\n\"code\": \"\", \"message\": {\r\n\"lang\": \"en-US\", \"value\": \"Error processing request stream. The property name 'from' specified for type 'Microsoft.Crm.Sdk.Data.Services.PhoneCall' is not valid.\"\r\n}\r\n}\r\n}",
      "status": 400,
      "statusText": "Bad Request"
  } 
   "error" 
   "Bad Request" 
  
  &lt;code&gt;
  
      var fromArray = [];
   var FromActivityParty = {
        PartyId:
       {
        Id: Xrm.Page.context.getUserId(),
        LogicalName: "systemuser"
       },
        ActivityId: {
         Id: TeamId,
         LogicalName: "team"
        },
        ParticipationTypeMask: { Value: 1 }
       };
   fromArray[0] = FromActivityParty;
  
   var toArray = [];
   var ToActivityParty = {
      PartyId:
       {
        Id: Xrm.Page.data.entity.getId(),
        LogicalName: "account"
       },
        ActivityId: {
         Id: TeamId,
         LogicalName: "team"
        },
        ParticipationTypeMask: { Value: 2 }
       }; 
    toArray[0] = ToActivityParty;
  
      var PhoneCall = {   
          from: fromArray, 
          to: toArray,
          Subject: "Create a phonecall record",
          OwnerId: fromArray,
          PhoneNumber: phoneNumber
      }
  
  
          CrmRestKit.Create("PhoneCall", PhoneCall)
                  .fail(function (xhr, status, errorThrown) 
                  { 
                      console.log(JSON.stringify(xhr, null, 4)); 
                      console.log(JSON.stringify(status, null, 4)); 
                      console.log(JSON.stringify(errorThrown, null, 4)); 
  
                  })
                  .done(function (data, status, xhr) {
                      console.log(JSON.stringify(data, null, 4));
      }
  
  &lt;/code&gt;
  </code></pre>