Dela via


UpdateItem (Task)

Topic Last Modified: 2009-07-24

The UpdateItem operation is used to update task item properties in the Exchange store.

Remarks

You cannot use Exchange Web Services to send task requests. Exchange Web Services can return task requests that are created by Microsoft Office Outlook. If a task request has already been sent, a request to update the task will return an error.

To correctly save the DateTime properties of a task, a time zone is required. However, in versions of Exchange earlier than Microsoft Exchange Server 2007 Service Pack 2 (SP2), no time zone information is passed to Exchange Web Services (EWS). Starting with Exchange 2007 SP2, Exchange Web Services includes the ability to specify the time zone when you create task items. For more information, see Updating Exchange Web Services Clients for Exchange 2007 SP2. If you do not specify the time zone when you update tasks in Exchange 2007 SP2, EWS will use the current time zone offset to create the time zone that is used for DateTime properties when the task is updated. (This change was introduced in Exchange 2007 SP1 with Update Rollup 4 (RU4) applied).

Updating the Current Occurrence of a Recurring Task

The result of an UpdateItem operation on recurring tasks differs from the result of the UpdateItem operation on a single, nonrecurring task. Changes to an occurrence of a recurring task cause one-off tasks to be generated when the following updates are made:

  1. The status property of a regenerating or nonregenerating recurrent task is set to Completed.
  2. The start date or end date of a nonregenerating recurrent task is changed.

For example, if an UpdateItem request sets the Completed value of a recurring task to true, the UpdateItemResponse will include a new Id and ChangeKey that represent a newly created one-off task. The Id that was included in the request is still valid and the recurring task that is represented by that Id has been updated to represent the next occurrence. The ChangeKey that was included in the request is no longer valid because the recurring task has been updated.

You can use the GetItem Operation to get the latest ChangeKey for the recurring task.

For nonrecurring tasks or for the last occurrence of a recurring task, the UpdateItem response returns the same Id that was passed to it and returns the associated updated ChangeKey.

See Also

Reference

UpdateItem Operation