共用方式為


Delete or end a recurring appointment series or instance

 

Applies To: Dynamics CRM 2013

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.

In This Topic

Delete a recurring appointment instance

Delete a recurring appointment series

End a recurring appointment series

Delete a recurring appointment instance

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 CRM for Microsoft Office Outlook.

Delete a recurring appointment series

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.

End a recurring appointment series

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.

See Also

Recurring appointment entities
Link custom attributes of the recurring appointment master (series) and appointment entities
Sample: Create, retrieve, update, and delete a recurring appointment
Sample: End a recurring appointment series