none
How to update one contact item or multiple contact items with known "ServerId" from Contact Folder for ActiveSync? RRS feed

  • Question

  • Hi,

    I'm trying to implement the update contact function for ActiveSync.  I ran into a problem that when I update a contact and specify only the field that have the value changed, the contact on the server remove all the un-updated field after the update operation.  This is not a desired effect. Can someone tell me or post an example of the xml for the ActiveSync UPDATE command that will not remove the un-updated field?

    Here is an example of the xml content that I use to update a field of contact on the server:

    <?xml version="1.0" encoding="UTF-8"?>
    <Sync xmlns="AirSync:">
     <Collections>
      <Collection>
       <Class>Contacts</Class>
       <SyncKey>0000000001065B8B3CA2264B9415C0130212T223937.253130212T223937.250</SyncKey>
       <CollectionId>2:0</CollectionId>
       <DeletesAsMoves>
       </DeletesAsMoves>
       <GetChanges>0</GetChanges>
       <WindowSize>512</WindowSize>
       <Commands>
        <Change>
         <ServerId>2:19b5254e-0000-0000-0000-000000000000</ServerId>
         <ApplicationData>
          <FirstName>New-firstname</FirstName>
         </ApplicationData>
        </Change>
       </Commands>
      </Collection>
     </Collections>
    </Sync>

    The operation is successful with the following response but the contact on the server now has only the FirstName field.

    <?xml version="1.0" encoding="UTF-8"?>
    <Sync xmlns="AirSync:">
     <Collections>
      <Collection>
       <Class>Contacts</Class>
       <SyncKey>0000000001065B8B3CA2264B9415C0130212T223938.803130212T223937.250</SyncKey>
       <CollectionId>2:0</CollectionId>
       <Status>1</Status>
      </Collection>
     </Collections>
    </Sync>

    Do I miss some param that will not remove the unchanged fields of the contact on the server?

    Thanks,

    Truyen


    • Edited by truyenh Tuesday, February 12, 2013 10:43 PM
    Tuesday, February 12, 2013 10:42 PM

Answers

  • Hi Truyen,

    Thank you for your patience. Let’s not discuss what a syntactically wrong Sync command request does, as the first step make the request syntactically correct.
    Where did you get the template from? In [MS-ASCMD] — v20130203 in section “
    2.2.3.27.5 Class (Sync)” the <Class> element doesn’t have <Collection> parent, it looks like you left out the <Options> layer.
    The syntax of the Sync command request is defined in section “
    2.2.2.19.1 Request”.

    Thanks, Vilmos
    Friday, March 1, 2013 8:51 PM

All replies

  • Truyen,

    Thank you for your question.  An engineer from the Protocols team will contact you soon.


    Bryan S. Burgin Senior Escalation Engineer Microsoft Protocol Open Specifications Team

    Wednesday, February 13, 2013 6:01 PM
    Moderator
  • Hi Truyen,

    I am the engineer who will be working with you on this issue. I am currently researching the problem and will provide you with an update soon.

    Regards,
    Vilmos Foltenyi - MSFT

    Friday, February 15, 2013 8:26 AM
  • Hi Truyen,

    Thank you for your patience. Let’s not discuss what a syntactically wrong Sync command request does, as the first step make the request syntactically correct.
    Where did you get the template from? In [MS-ASCMD] — v20130203 in section “
    2.2.3.27.5 Class (Sync)” the <Class> element doesn’t have <Collection> parent, it looks like you left out the <Options> layer.
    The syntax of the Sync command request is defined in section “
    2.2.2.19.1 Request”.

    Thanks, Vilmos
    Friday, March 1, 2013 8:51 PM
  • Hi Truyen,

    Because there is no respond to this issue since my last posting, I assume that pointing out the syntactical error in your request solved the problem and I’ll mark this thread as answered. If you wish to proceed in the future, please post to this thread.

    Thanks, Vilmos
    Saturday, March 9, 2013 12:44 AM