title: How do I update state (open,complete) in a silverlight/odata project for Dynamics CRM 2011
body: <p>I have a silverlight app hosted in CRM 2011 online. I have functionality where I am updating a phone call and display two fields in a small form. I have the requirement to mark as complete but I seem to be failing here.</p>
  
  <p>I have:</p>
  
  <pre><code>phoneCall.StateCode.Value = 1;
  
  phoneCall.Subject = activity.Subject;
  phoneCall.Description = activity.Description;
  
  _context.UpdateObject(phoneCall);
  _context.BeginSaveChanges(OnChangesSaved, phoneCall);
  </code></pre>
  
  <p>The subject works and saves as well as the description but the statecode does not. StateCode is not null this is an existing object and it's currently set to 0 (open). The save does not affect the StateCode. I have this in a try-catch and no error is being reported.</p>