0

我正在尝试添加更多必需的与会者。但是我遇到了错误,代码是-2146233087。

activityparty activityParty = new activityparty();         
activityParty.partyid = new Lookup();            
activityParty.partyid.Value = contact.contactid.Value;     
appointment.requiredattendees = new activityparty[] { activityParty };   
service.Update(appointment);
4

1 回答 1

1

嗨 atlast 我发现了问题,我错过了实体的类型并解决了问题。但它只是将错误作为异常抛出而不告诉它,并且在添加类型之后它是固定的。

activityparty activityParty = new activityparty();         
activityParty.partyid = new Lookup();            
activityParty.partyid.Value = contact.contactid.Value;     
**activityParty.partyid.type = "contact";**
appointment.requiredattendees = new activityparty[] { activityParty };   
service.Update(appointment);
于 2012-12-27T09:08:34.350 回答