我正在尝试添加更多必需的与会者。但是我遇到了错误,代码是-2146233087。
activityparty activityParty = new activityparty();
activityParty.partyid = new Lookup();
activityParty.partyid.Value = contact.contactid.Value;
appointment.requiredattendees = new activityparty[] { activityParty };
service.Update(appointment);
答案 0 :(得分: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);