Update a recurring appointment
Applies To: CRM 2015 on-prem, CRM Online
You can either update the whole series or update an instance of a recurring appointment.
You can update a recurring appointment series by using the IOrganizationService.Update method or the UpdateRequest message on the RecurringAppointmentMaster entity. You can update the basic or recurrence information.
When you update the basic information of a recurring appointment series, such as subject, location, or attendees, all instances in the recurring appointment series are updated except those that have exceptions on the same attribute.
When you update the recurring information of a recurring appointment series, such as pattern and range, the following things occur:
A new series with a new RecurringAppointmentMaster.ActivityId is created that has the same information as the original series, and the date in the RecurringAppointmentMaster.EffectiveEndDate attribute of the new series is set to the last occurring past instance of the original series. All the future instances of the original series are deleted. In this manner, the original series is ended, and the history of the past instances is preserved in the system by storing it in a new series.
The new information is used to create the future instances of the new series from the effective start date (RecurringAppointmentMaster.EffectiveStartDate).
Also, the RecurringAppointmentMaster.GroupId attribute for both the original and the new series is populated with the same value. This implies that whenever you update the recurrence information in a recurring appointment series, all the new series’ that are created have the same value for the RecurringAppointmentMaster.GroupId attribute as the recurring appointment series that is updated, although each series has a unique series ID.
|When you update the recurrence information of a recurring appointment series that has all the instances slated to occur in future, all instances are deleted and new recurrence information is used to create or expand new instances.|
To see the sample code for updating a recurring appointment series, see Sample: Reschedule and cancel a recurring appointment.
Because the recurring appointment records are stored as appointment objects, you can use the IOrganizationService.Update method on the Appointment entity to update a recurring appointment instance. When you update a recurring appointment instance, the instance is marked as an exception to the recurring appointment series. More information: Create a Recurring Appointment Exception
You can also use the CreateExceptionRequest class on the Appointment entity to update a recurring appointment instance.
|Recurring appointment instances can be identified using the Appointment.InstanceTypeCode attribute, which will have a value of “2” (Recurring Instance). More information: Appointment entity messages and methods|
Microsoft Dynamics CRM 2015 and Microsoft Dynamics CRM Online
Send comments about this topic to Microsoft.
© 2015 Microsoft. All rights reserved.