EWS で予定に拡張プロパティを使用しようとしましたが、予定が再び見つからないようです。プロパティの設定部分は、この質問に示されているものと同じです。
ASP.NET で Exchange Web サービス マネージ API 2.0 から予定を更新する方法
予定を取得しようとすると、次の例に従いました。
http://msdn.microsoft.com/en-us/uc14trainingcourse_5l_topic3#_Toc254008129 http://msdn.microsoft.com/en-us/library/exchange/dd633697(v=exchg.80).aspx
しかし、ルックアップを行ったときに、予定が返されることはありません。
ルックアップのコードは次のとおりです。
ItemView view = new ItemView(10);
// Get the GUID for the property set.
Guid MyPropertySetId = new Guid("{" + cGuid + "}");
// Create a definition for the extended property.
ExtendedPropertyDefinition extendedPropertyDefinition =
new ExtendedPropertyDefinition(MyPropertySetId, "AppointmentID", MapiPropertyType.String);
view.PropertySet =
new PropertySet(
BasePropertySet.IdOnly,
ItemSchema.Subject,
AppointmentSchema.Start,
AppointmentSchema.End, extendedPropertyDefinition);
SearchFilter filter = new SearchFilter.Exists(extendedPropertyDefinition);
FindItemsResults<Item> findResults = service.FindItems(WellKnownFolderName.Inbox, filter,
view);
どんな助けでも大歓迎です。
編集: ドキュメントが示すようにプロパティを作成しようとすると:
http://msdn.microsoft.com/en-us/library/exchange/dd633654(v=exchg.80).aspx
Guid im がプロパティ値として追加されているため、失敗します。:-/
もう一度編集: 今日のすべての予定を取得し、作成したばかりの予定からプロパティを取得しようとしましたが、{} なしで保存したものと同じであるため、フィルターを使用する必要があります。
もう一度編集 *
ExtendedPropertyDefinition extendedProperty = new ExtendedPropertyDefinition(
私が使用する場合:
new ExtendedPropertyDefinition(
DefaultExtendedPropertySet.Appointment,
"AppointmentID",
MapiPropertyType.String);
プロパティを持つすべての予定を検索しますが、特定の予定を検索すると:
Guid MyPropertySetId = new Guid("{" + cGuid + "}");
ExtendedPropertyDefinition extendedProperty =
new ExtendedPropertyDefinition(
MyPropertySetId,
"AppointmentID",
MapiPropertyType.String);
その後、何も見つかりません。