3
我试图更新电话实体上的字段,然后关闭它。据我所知,目前这样做需要两次电话。但是,这是非常缓慢的,因为处理60个电话需要30分钟,而我有大约20万个电话。有没有办法将两者合并为一个呼叫?多个执行调用
这里是我当前的代码 -
foreach (phonecall phonepointer in _businessEntityCollection.BusinessEntities.Cast<phonecall>()
.Where(phonepointer => phonepointer.statecode.Value == PhoneCallState.Open))
{
//Update fiserv_contactstatus value
phonepointer.fiserv_contactstatus = Picklist;
crmService.Update(phonepointer);
//Cancel activity
setStatePhoneCallRequest.PhoneCallState = PhoneCallState.Canceled;
setStatePhoneCallRequest.PhoneCallStatus = 200011;
setStatePhoneCallRequest.EntityId = phonepointer.activityid.Value;
crmService.Execute(setStatePhoneCallRequest);
}
出于某种原因,它将代码格式化为有趣,但有一个更新调用,然后是执行调用。 – Merds 2011-12-21 17:06:49
这个实体还有其他插件吗? 30分钟太过分了。 – ccellar 2011-12-21 17:13:14
不,这个entirdy – Merds 2011-12-21 17:24:46