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.
I have:
phoneCall.StateCode.Value = 1;
phoneCall.Subject = activity.Subject;
phoneCall.Description = activity.Description;
_context.UpdateObject(phoneCall);
_context.BeginSaveChanges(OnChangesSaved, phoneCall);
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.