Delete or end a recurring appointment series or instance

 

Updated: November 29, 2016

Applies To: Dynamics 365 (online), Dynamics 365 (on-premises), Dynamics CRM 2016, Dynamics CRM Online

You can delete a recurring appointment series, delete an instance in the series, or end a recurring appointment series after a specified date and time.

Because recurring appointment instances are stored as appointment objects, you can use the IOrganizationService.DeleteRequest on an appointment record to delete a recurring appointment instance. Deleting an appointment instance marks it as an exception by creating an entry for the instance in the RecurringAppointmentMaster.DeletedExceptionsList attribute for the parent appointment series object. This is done to track the deleted instance for later synchronization with Microsoft Dynamics 365 for Outlook.

You can use the IOrganizationService.Delete method or the DeleteRequest on a RecurringAppointmentMaster record to delete a recurring appointment series. Deleting a series deletes the record and all of the associated recurring appointment instances.

If you want to end a series before the original end date specified during the creation of the series, you can use the DeleteOpenInstancesRequest class. Using this message does the following:

  • Deletes all the “open” and “scheduled” future instances of the specified series from the date specified in the SeriesEndDate property. However, if the state of the future instances is changed to “completed” or “canceled”, they are not deleted.

  • Sets the status of the past instances to the specified value in the StateOfPastInstances property. However, the past instances are not deleted.

  • Terminates the series to the last occurring past instance date with respect to the date specified in the SeriesEndDate property, and sets the state of the series to “canceled”.

This allows you to preserve the instances of a recurring appointment series even if you have decided to end it prematurely. This is useful if you have attached notes or attachments to past instances of a recurring appointment series that contain important information about the customer or business.

Microsoft Dynamics 365

© 2016 Microsoft. All rights reserved. Copyright

Show: