I see you have a similar post, but I have different question.
I am pulling the appointments from a database. I am not using the serilization methods shown in your samples. Rather, I have my own database routines, etc...
So, when I load a schedule, I load a bunch of Recurrence records and a more Appointment records. There are several fields that probably need to be set before adding the appointment to the calendarInfo object. They are:
Which members do I need to define? Can you direct me to a help file subject on this?
Also, the RecurrenceId values seems to change. For instance when I set up a recurrence, then go to one of the later recurring values and resize it (in the day view). When the new variance shows up in UltraCalendarInfo.AfterAppointmentAdded, it seems that the RecurrenceId might be changing.
This RecurrenceId changing could be my bug. I am asking because I had the other questions listed above. {Edited, This is my bug...}
Thanks for your Help!
Bob
No comments on the post yet. So I thought what I learned so far. The help file under IsRecurringAppointmentRoot has a pretty good sample that covers a lot of the questions above.
The Recurrence Object can only be assigned to the root appointment. So this is not needed when i load variances.
IsVariance, IsRecurringAppointmentRoot, RecurrenceId and RecurringAppointmentRoot are all read only... So these are not set during creation.
Also the Recurrence.Variances collection does not have an add method, so I am beginning to think, that the only way to create a variance, is to:
A variance is an occurrence which was generated by an AppointmentRecurrence and has been changed such that one or more property values differ from that of the RecurringAppointmentRoot. For example, if you a non-modified member of a recurrence in the subset returned from the UltraCalendarInfo.GetAppointmentsInRange method, and you changed the value of the Subject property on one of them, that occurrence would then be considered a variance. A new member would be added to the Appointments collection for that member, and that instance would refer back to the RecurringAppointmentRoot, but be designated as a variance.
No, you can't force creation of a variance. Use UltraCalendarInfo.GetAppointmentsInRange to get the appointments within a particular date range, then access the one that you want to be a variance (I assume you have a precise date), and then change the Appointment property that will make it a variance (Subject, Location, AllDayEvent, etc.).
Note that if you bind your appointments via the AllPropertiesMember, any previously created variances should re-associate themselves with the root when you deserialize them in.
Thanks Brian!
So does that mean that when I reload variances that I stored, I:
Will this add the variance created in step two the recurring appointment created in step 1?
Thanks for the help!