我正在尝试将现有约会的项目设置为所有者,我正在使用类似于遵循Xml请求的内容:
<ns1:UpdateItem xmlns:ns1="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:ns2="http://schemas.microsoft.com/exchange/services/2006/types" ConflictResolution="AlwaysOverwrite" SendMeetingInvitationsOrCancellations="SendToNone">
<ns1:ItemChanges>
<ns2:ItemChange>
<ns2:ItemId Id="AAMkADY1ZDIwNjM1LTU4MjAtNGQy...ogbn8LT58s6MSx+1IiAZWtaUhFAACF1Gogbn8LT58s6MSx+1IiAZ3GKIJbAAA=" ChangeKey="DwAAABYAAACF1Gogbn8LT58s6MSx+1IiAZ3HHOPj"/>
<ns2:Updates>
<ns2:SetItemField>
<ns2:ExtendedFieldURI DistinguishedPropertySetId="Appointment" PropertyId="33321" PropertyType="Boolean"/>
<ns2:CalendarItem>
<ns2:ExtendedProperty>
<ns2:ExtendedFieldURI DistinguishedPropertySetId="Appointment" PropertyId="33321" PropertyType="Boolean"/>
<ns2:Value>true</ns2:Value>
</ns2:ExtendedProperty>
</ns2:CalendarItem>
</ns2:SetItemField>
<ns2:SetItemField>
<ns2:ExtendedFieldURI DistinguishedPropertySetId="Appointment" PropertyId="33303" PropertyType="Integer"/>
<ns2:CalendarItem>
<ns2:ExtendedProperty>
<ns2:ExtendedFieldURI DistinguishedPropertySetId="Appointment" PropertyId="33303" PropertyType="Integer"/>
<ns2:Value>1</ns2:Value>
</ns2:ExtendedProperty>
</ns2:CalendarItem>
</ns2:SetItemField>
</ns2:Updates>
</ns2:ItemChange>
</ns1:ItemChanges>
</ns1:UpdateItem>
我需要您的帮助才能使用EWS API来进行此调用而不是SOAP调用。
答案 0 :(得分:1)
我想我明白了:
ExtendedPropertyDefinition definition;
definition = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.Appointment, 33321, MapiPropertyType.Boolean);
appointment.SetExtendedProperty(definition, true);
definition = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.Appointment, 33303, MapiPropertyType.Integer);
appointment.SetExtendedProperty(definition, 1);
appointment.Update(ConflictResolutionMode.AlwaysOverwrite, SendInvitationsOrCancellationsMode.SendToNone);