Hi guys,
I am trying to programmatically close a phonecall activity, but I must
be missing something. I get a "Server was unable to process request."
(Not entirely descriptive!)
My code looks as follows:
private void CloseCall(string callId)
{
using (CrmService svc =
ServiceFactory.GetWebService<CrmService>())
{
ColumnSet cols = new ColumnSet();
cols.Attributes = new string[] {"activityid",
"statecode",
"statuscode"};
phonecall entity =
(phonecall)svc.Retrieve(EntityName.phonecall.ToString(), new
Guid(callId), cols);
entity.statecode.Value = PhoneCallState.Completed;
entity.statuscode.Value = 2;
svc.Update(entity);
}
}
What am I missing? Would it be enough to just set the Value property of
the statuscode field to 2?
Thanks again for all the help!
--
Ernst Kuschke
MVP - C#
http://dotnet.org.za/ernst