Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
Trouble editing single occurrence of recurrence
posted

I'm having trouble editing single occurrence of recurrence. I'm using a custom appointment dialog and can load it and save the series fine but when I chooses Open This Occurrence, make a change, and save it then it removes the recurrence and makes it a single appointment. there is some of what I'm doing. Please let know where I'm going wrong!!!

 

 

 

 

 

 

 

 

 

 

 

 

 

Dim appRoot As Appointment

 

 

If IsNothing(e.Appointment.RecurringAppointmentRoot) = False Then

 

 

Dim recurrenceTypeDialog As New RecurrenceEditTypeDialog(e.Appointment, RecurrenceEditTypeDialogType.Open)

recurrenceTypeDialog.ShowDialog()

 

 

Dim result As RecurrenceEditTypeDialogResult = recurrenceTypeDialog.Result

 

 

If result = RecurrenceEditTypeDialogResult.Occurrence Then

appRoot = e.Appointment

e.RecurrenceEditType = RecurrenceEditType.Occurrence

 

 

ElseIf result = RecurrenceEditTypeDialogResult.Series Then

appRoot = e.Appointment.RecurringAppointmentRoot

e.RecurrenceEditType = RecurrenceEditType.Series

 

 

Else

 

 

Exit Sub

 

 

End If

 

 

Else

appRoot = e.Appointment

 

 

End If

AppDialog.aAppt = appRoot

AppDialog.rRec = appRoot.Recurrence

AppDialog.iID = appRoot.DataKey

AppDialog.iOwnerID = appRoot.Owner.Key

...

Parents
  • 69832
    Offline posted

    Changing an occurrence makes it what we refer to as a variance, which means it is still associated with the recurrence, but since it differs from it, it can no longer be described solely by the recurrence.This causes an Appointment instance to be created for it and added to the Appointments collection. I'm not sure exactly what you mean by "removes the recurrence and makes it a single appointment", but the Appointment.RecurringAppointmentRoot property of the resulting appointment should still reference the root appointment (whose Recurrence property in turn references the AppointmentRecurrence).

Reply Children