Quantcast
Channel: Exchange Server Development forum
Viewing all articles
Browse latest Browse all 7132

Custom properties added by EWS not visible in Outlook

$
0
0
Hi all
I'm a first-time Exchange and Outlook addin developer and I'm stuck on a problem.

I'm working on a project where we use an Outlook 2003 addin that tags items; mail, appointments and tasks
with custom properties.

In Outlook we do this by adding the data as UserProperties.
After the items have been saved an onsave eventSink triggers on the Exchange 2007 mailbox server and using CDOEX, checks for the tags, collects some data and sends them to an web service wich stores the data on an AX server.
This works fine.

Then we want the AX server to be able to update and create new items back against exchange, and for this we use Exchange Web Services.
I've made an application that performs the operations agains EWS, and everything works smoothly except when we add the custom properties.
We add them as extendedproperties with the following code:

ExtendedPropertyType extendedProperty = new ExtendedPropertyType();
extendedProperty.ExtendedFieldURI = new PathToExtendedFieldType();
extendedProperty.ExtendedFieldURI.DistinguishedPropertySetId = DistinguishedPropertySetType.PublicStrings;
extendedProperty.ExtendedFieldURI.DistinguishedPropertySetIdSpecified = true;
extendedProperty.ExtendedFieldURI.PropertyName = propertyName;
extendedProperty.ExtendedFieldURI.PropertyType = MapiPropertyTypeType.String;
extendedProperty.Item = propertyValue;

This worked well for the eventSink, we found the fields and got the values just like we did for items tagged by the Outlook addin.

However, the Outlook Addin could not find them in the UserProperties object for the item, and Using Outlookspy I could plainly see that they were not present.

After a bunch of searching I found a thread on this forum that discussed adding custom properties as ExtendedPropertyTypes via EWS using a guid as a PropertySetType.
Here it is: http://forums.microsoft.com/technet/showpost.aspx?postid=1764780&siteid=17

I followed the instructions here, and now both the eventSink and Outlook are unable to find the properties.

My question is:
How can I apply my tags so both my Outlook addin and EWS can create, update and read them, as well as allowing the eventSink to easily read them?
The simplest way, I imagine, is if I could make Exchange Web Services place the properties in the "UserProperties" object.

I would greatly appreciate any help.

thanks
Ragnar Fatland



Viewing all articles
Browse latest Browse all 7132

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>