4.2.2 Marking a Flag as Complete

The following example shows a Sync command request ([MS-ASCMD] section 2.2.1.21) sent from the client to the server to mark a flag as complete. The Status element (section 2.2.2.74) value of 1 indicates that the flag status is complete. The tasks:DateCompleted element (section 2.2.2.23) value indicates when the user updated the e-mail flag in the client to mark it as complete, and the CompleteTime element (section 2.2.2.19) value indicates the time that the item was marked as finished.

 <?xml version="1.0" encoding="utf-8"?>
 <Sync xmlns:email="Email:" xmlns:tasks="Tasks:" xmlns="AirSync:">
   <Collections>
     <Collection>
       <SyncKey>509846121</SyncKey>
       <CollectionId>5</CollectionId>
       <DeletesAsMoves>1</DeletesAsMoves>
       <GetChanges>1</GetChanges>
       <WindowSize>512</WindowSize>
       <Commands>
         <Change>
           <ServerId>5:5</ServerId>
           <ApplicationData>
             <email:Read>1</email:Read>
             <email:Flag>
               <email:Status>1</email:Status>
               <email:FlagType>Flag for follow up</email:FlagType>
               <email:CompleteTime>2009-02-19T08:30:00.000Z</email:CompleteTime>
               <tasks:StartDate>2009-02-19T08:00:00.000Z</tasks:StartDate>
               <tasks:UtcStartDate>2009-02-19T08:00:00.000Z</tasks:UtcStartDate>
               <tasks:DueDate>2009-02-19T08:00:00.000Z</tasks:DueDate>
               <tasks:UtcDueDate>2009-02-19T08:00:00.000Z</tasks:UtcDueDate>
               <tasks:DateCompleted>2009-02-19T09:30:00.000Z</tasks:DateCompleted>
               <tasks:ReminderSet>0</tasks:ReminderSet>
               <tasks:ReminderTime>2009-02-24T20:00:00.000Z</tasks:ReminderTime>
               <tasks:Subject>Please follow up</tasks:Subject>
             </email:Flag>
           </ApplicationData>
         </Change>
       </Commands>
     </Collection>
   </Collections>
 </Sync>