modifyItemRequest

Modifies the selected item with the given updates. The modifyItemRequest is used to delete, add, and update fields on existing items. Deletions are processed before the additions and updates.

Request

<modifyItemRequest>
   <id type="types:uid"/>
   <notification type="types:SharedFolderNotification"/>
   <updates type="types:ItemChanges"/>
   <recurrenceAllInstances type="unsignedInt"/>
</modifyItemRequest>

Response

<modifyItemResponse>
   <modified type="dateTime"/>
   <id type="types:uid"/>
   <status type="types:Status"/>
</modifyItemResponse>

Elements

id

Specifies the ID of the item to modify.

notification

Specifies the shared folder notification on a modification.

updates

Specifies additions, deletions, or modifications to the item.

recurrenceAllInstances

Specifies the recurrenceKey to apply the modification to all the recurring items. Modifications to distributed items are limited.

modified

Specifies the time the item was modified.

code

Returns the error number related to the event. 0 indicates that the request was successful.

status

Returns the success or failure of the method.

Remarks

The modifyItemRequest modifies the following item types:

  • Address Book Items

    • Contacts

    • Groups

    • Organizations

    • Personal Address Books

    • Resources

  • Categories

  • Folders

  • Rules

  • Shared Folders

  • Mail Items

    • Mail

    • Appointments

    • Tasks

    • Notes

    • Phone

Most fields on a personal or posted mail item can be modified. The only elements that can be modified on a distributed mail item are the subject, categories, and custom fields.

Example

The following examples show different uses of modifyItemRequest.

Modify a Posted Item

<modifyItemRequest> 
   <id>45097153.domain1.po1.100.16E3837.1.FC7.1@1:7.
        domain1.po1.100.0.1.0.1@16</id> 
   <updates> 
         <add> 
            <returnSentItemsId>1</returnSentItemsId> 
            <options/> 
         </add> 
      <update> 
         <returnSentItemsId>1</returnSentItemsId> 
         <subject>Posted Item - changed</subject> 
         <message length="44">VGhpcyBpcyBhIHBvc3RlZCBpdGVtLgoKCmNo
              YW5nZWQA</message> 
      </update> 
   </updates> 
</modifyItemRequest>

<modifyItemResponse> 
   <modified>2012-09-14T21:13:29Z</modified> 
   <status> 
      <code>0</code> 
   </status> 
</modifyItemResponse>

Modify a Contact

<modifyItemRequest>
   <id>406BD9A1.AutoDomain.AutoPO1.104.1363230.1.E3.1@56:
          3B38B6FA.AutoDomain.AutoPO1.104.1363230.1.1.1@53</id>
   <updates>
      <add> 
         <phone>1-1111</phone> 
         <emailList primary="jdoe@novell.com"
            <email>jdoe@novell.com</email> 
         </emailList> 
         <phoneList default="2-2222"
            <phone type="Office">1-1111</phone>
            <phone type="Home">2-2222</phone>
            <phone type="Mobile">3-3333</phone>
            <phone type="Fax">4-4444</phone>
            <phone type="Pager">5-5555</phone>
         </phoneList>
         <email>jdoe@novell.com</email> 
      </add> 
      <delete>
         <phone>1-1111</phone> 
         <emailList primary="jdoe@novell.com"
            <email>jdoe@novell.com</email> 
         </emailList> 
         <phoneList>
            <phone type="Office">1-1111</phone>
            <phone type="Home">2-2222</phone>
            <phone type="Mobile">3-3333</phone>
            <phone type="Fax">4-4444</phone>
            <phone type="Pager">5-5555</phone>
         </phoneList> 
         <email>jdoe@novell.com</email> 
      </delete>
   </updates>
</modifyItemRequest>