DeleteItem

Last modified: September 30, 2010

Applies to: Exchange Server 2007 | Exchange Server 2010

The DeleteItem element defines a request to delete an item from a mailbox in the Exchange store.

<DeleteItem DeleteType="" SendMeetingCancellations="" AffectedTaskOccurrences="">
   <ItemIds/>
</DeleteItem>

DeleteItemType

Attributes and Elements

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute

Description

DeleteType

Describes how an item is deleted. This attribute is required.

SendMeetingCancellations

Describes whether a calendar item deletion is communicated to attendees. This attribute is required when calendar items are deleted. This attribute is optional if non-calendar items are deleted.

AffectedTaskOccurrences

Describes whether a task instance or a task master is deleted by a DeleteItem Operation. This attribute is required when tasks are deleted. This attribute is optional when non-task items are deleted.

DeleteType Attribute

Value

Description

HardDelete

An item is permanently removed from the store.

SoftDelete

An item is moved to the dumpster if the dumpster is enabled.

MoveToDeletedItems

An item is moved to the Deleted Items folder.

SendMeetingCancellations Attribute

Value

Description

SendToNone

A calendar item is deleted without sending a cancellation message.

SendOnlyToAll

A calendar item is deleted and a cancellation message is sent to all attendees.

SendToAllAndSaveCopy

A calendar item is deleted and a cancellation message is sent to all attendees. A copy of the cancellation message is saved in the Sent Items folder.

AffectedTaskOccurrences Attribute

Value

Description

AllOccurrences

A delete item request deletes the master task, and therefore all recurring tasks that are associated with the master task.

SpecifiedOccurrenceOnly

A delete item request deletes only specific occurrences of a task.

Child Elements

Element

Description

ItemIds

Contains an array of items, occurrence items, and recurring master items to delete from a mailbox in the Exchange store. The DeleteItem Operation can be performed on any item type.

Parent Elements

None.

Remarks

The MoveToDeletedItems and HardDelete options are transactional, which means that by the time a Web service call completes, the database has moved the item to the Deleted Items folder or permanently removed the item from the Exchange database. This behavior is the same for MicrosoftExchange Server 2007 and Exchange Server 2010.

The SoftDelete option works differently for different target versions of Exchange. SoftDelete for Exchange 2007 sets a bit on the item that indicates to the Exchange database that the item will be moved to the dumpster folder at an indeterminate time in the future. SoftDelete for Exchange 2010 immediately moves the item to the dumpster. SoftDelete is not an option for folder deletion. SoftDelete traversal searches for items and folders will not return any results.

The schema that describes this element is located in the IIS virtual directory that hosts Exchange Web Services of the Client Access server.

Element Information

Namespace

https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name

Messages schema

Validation File

Messages.xsd

Can be Empty

False