I am currently setting custom ExtendedProperties
on a CalendarFolder
using EWS Managed API (C#):
myCalendar.SetExtendedProperty(customExtendedProperty, true);
I can also use the Managed API to load those settings when I bind the CalendarFolder
:
var myCalendar = CalendarFolder.Bind(service, folderId, requestedPropertySet);
I would next like to read these same ExtendedProperties
, but from an Outlook Add-In using the Office JavaScript libraries.
From the looks of the the Outlook library does not expose any methods off of Office.context.item
to access the ExtendedProperties
.
Are there methods in the library that allow me to access this? If not, can I use the schema approach which has the GUID in the URL path ("http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/yourProp"
)?
To access your own custom properties on a folder in Addin you need to use the makeEwsRequestAsync https://dev.outlook.com/reference/add-ins/Office.context.mailbox.html#makeEwsRequestAsync to do a GetFolder in your Addin. To get the correct SOAP message just enabling tracing in you EWS Managed API code which will output the SOAP used https://msdn.microsoft.com/en-us/library/office/dn495632(v=exchg.150).aspx which you can these transpose. The one thing to be aware of is the security requirements for making a makeEwsRequestAsync in your app eg ReadWriteMailbox http://dev.office.com/docs/add-ins/outlook/understanding-outlook-add-in-permissions