DAV: How To Add Recurrence to a Single Appointment
The following PROPPATCH will add indefinite weekly recurrence to an individual appointment…
<?xml version="1.0"?> <propertyupdate xmlns="DAV:" xmlns:c="urn:schemas:calendar:" xmlns:x="xml:" xmlns:ma="https://schemas.microsoft.com/mapi/" xmlns:e="https://schemas.microsoft.com/exchange/"> <set> <prop> <ma:recurtype>2</ma:recurtype> <c:instancetype>1</c:instancetype> <c:rrule> <x:v>FREQ=WEEKLY;WKST=SU;INTERVAL=1;BYDAY=TH</x:v> </c:rrule> <c:timezoneid>10</c:timezoneid> <e:patternend>9999-12-31T05:00:00.000Z</e:patternend> </> </> </> |
There are several things are several things to note about this PROPPATCH:
“https://schemas.microsoft.com/mapi/recurtype” is a previously undocumented property that is used by Outlook to properly display the recurrence type in the “Active Appointments” calendar folder view. It takes the following values:
0 = Single
1 = Daily
2 = Weekly
3 = Monthly
4 = Yearly
“urn:schemas:calendar/timezoneid” is a required field to be submitted, even if it already exists on the appointment item. You will need to “pre-fetch” the timezoneid so that you can resubmit it with this PROPPATCH.
** You might not have the timezoneid property on your item rather a property named timezone. In this case you can “pre-fetch” timzone and submit that instead of timezoneid. For more information on these properties, click here.
** If the original item was created in Outlook, you might not have either timezone or timezoneid. Currently we have not identified a MAPI property that maps directly to one of these properties. However, you could “pre-fetch” the “https://schemas.microsoft.com/mapi/timezonedesc” property and use its value to map it to the corresponding timezoneid or timezone.
“https://schemas.microsoft.com/exchange/patternend” is required for the recurrence to be displayed properly in OWA. Without this property the recurrence will probably work fine in Outlook but it will not be expanded the appropriate number of times in OWA. Yes, you have to calculate what the end date would be if you are only doing a finite number of recurrences. If you have a hard end date just set that and the pattern will end on the last day within that end date.
Comments
- Anonymous
March 09, 2006
WebDAV Samples Index
&nbsp;
Listed below are links to my WebDAV samples.&nbsp; If you have questions... - Anonymous
March 09, 2006
In an effort to provide samples in a organized and repeatable manner, I have created a format for adding... - Anonymous
March 14, 2006
Hi Matt,
Might want to indicate that the recurtype property has to be the first property in the message.
Thanks again for all your help with this issue.
Larry - Anonymous
March 14, 2006
That is a good point, recurtype must be listed as the first property in the PROPPATCH do to underlying callbacks that happen on the server side.
Also of note, timezonedesc is the only property on a single appointment created by Outlook that identifies the client's timezone. All values in the ICAL body of the appointment item indicate server time.