![](/img/trans.png)
[英]storage of custom properties in a exchange public folder - Outlook
[英]Access custom view column from exchange public folder
我正在使用Exchange Web服務訪問公用文件夾中的聯系人記錄。 我需要提取為該文件夾中的視圖創建的自定義列“客戶聯系人管理”。 自定義列是在用戶界面中創建的。
之前,我已經在自己通過代碼創建的屬性上使用過ExtendedPropertyDefinition
類。 那是我在這種情況下應該使用的,如果是的話,那么我如何獲得自定義列的GUID?
我終於在Microsoft Exchange Server論壇上從David Sterling找到了關於該線程的答案。 他的示例(在下面復制)顯示了如何直接使用EWS和托管api來執行操作。
// via autogenerated proxy classes
PathToExtendedFieldType hairColorPath = new PathToExtendedFieldType();
hairColorPath.DistinguishedPropertySetId = DistinguishedPropertySetType.PublicStrings;
hairColorPath.DistinguishedPropertySetIdSpecified = true;
hairColorPath.PropertyName = "HairColor";
hairColorPath.PropertyType = MapiPropertyTypeType.String;
// via the Client API
ExtendedPropertyDefinition hairColor = new ExtendedPropertyDefinition(
DefaultExtendedPropertySet.PublicStrings,
"HairColor",
MapiPropertyType.String);
這是我針對自己的問題使用托管api所做的事情。 關鍵是使用DefaultExtendedPropertySet.PublicStrings
,這是Outlook存儲自定義視圖列的位置。
ExtendedPropertyDefinition _clientContactManagementPropertyDefinition =
new ExtendedPropertyDefinition(
DefaultExtendedPropertySet.PublicStrings,
"Client Contact Management",
MapiPropertyType.Boolean
);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.