Search code examples
exchange-serverexchangewebservicesews-managed-api

Facing issue in setting follow up for email


I am trying to set an email for follow up using the EWS managed api. I followed these links Link1 and Link2 for some guidance but it still i am sure i am missing many things here. The xml i send for updating flagstatus is

I have already put up a question to msdn support

i am sending this sample xml for it

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
   <soap:Header>
          <t:RequestServerVersion Version="Exchange2013"></t:RequestServerVersion>
      </soap:Header>
   <soap:Body>
          <UpdateItem ConflictResolution="AutoResolve" MessageDisposition="SaveOnly">
                 <ItemChanges>
                        <t:ItemChange>
                               <t:ItemId Id="AAMkAGEyNzAwYzc3LTkwZTgtNGI2MC05MzVkLTNjMjQzYTgyODc2OQBGAAAAAAA3WMO+ZnF/QrCdez0LEjxsBwB2Nkz9SQDSSozr39zl7KzqAAAAAAENAAB2Nkz9SQDSSozr39zl7KzqAACdlFOTAAA=" ChangeKey="CQAAABYAAAB2Nkz9SQDSSozr39zl7KzqAACdnI3c"></t:ItemId>
                               <t:Updates>
                                      <t:SetItemField>
                                             <t:FieldURI FieldURI="message:IsRead"></t:FieldURI>
                                             <t:Message>
                                                    <t:ExtendedProperty>
                                                           <ExtendedFieldURI PropertyTag="0x1090" PropertyName="FlagRequest" PropertyId="0" PropertyType="String"></ExtendedFieldURI>
                                                           <Value>2</Value>
                                                           <Values></Values>
                                                       </t:ExtendedProperty>
                                                    <t:IsRead>false</t:IsRead>
                                                </t:Message>
                                         </t:SetItemField>
                                  </t:Updates>
                           </t:ItemChange>
                    </ItemChanges>
             </UpdateItem>
      </soap:Body>

Using this i am getting "The request failed schema validation" as i am sure there a lot many things i need to properly while setting the extended property type.

I have looked up over google and in msdn forum but am still unclear what needs to be done to achieve it. Can some one please explain, possibly in detail, how this can be done? Whether the way i am updating the item as in xml above is totally wrong or it misses some basic idea.

Thanks Madhur


Solution

  • This worked for me:

    </soap:Header>
    <soap:Body>
        <m:UpdateItem MessageDisposition="SaveOnly" ConflictResolution="AlwaysOverwrite">
            <m:ItemChanges>
                <t:ItemChange>
                    <t:ItemId Id="AAAkAGFzaHJhZmFud2FyQG1pc3FhdGFyLm9ubWljcm9zb2Z0LmNvbQBGAAAAAADebl5aE9iCT5TWghrsI/MnBwDm30SftRRfT5FqZfPmjZoaAAAAAAEMAADm30SftRRfT5FqZfPmjZoaAACkgPgNAAA=" ChangeKey="CQAAABYAAADm30SftRRfT5FqZfPmjZoaAACkiiHb" />
                    <t:Updates>
                        <t:SetItemField>
                            <t:ExtendedFieldURI PropertyTag="0x1090"   PropertyType="Integer" />
                            <t:Message>
                                <t:ExtendedProperty>
                                    <t:ExtendedFieldURI PropertyTag="0x1090"   PropertyType="Integer" />
                                        <t:Value>2</t:Value>
                                    </t:ExtendedProperty>
                            </t:Message>
                        </t:SetItemField>
                    </t:Updates>
                </t:ItemChange>
            </m:ItemChanges>
        </m:UpdateItem>
    </soap:Body>