UpdateItem期间出错,因为ImAddress1的值为空? (ErrorIncorrectUpdatePropertyCount) [英] Error during UpdateItem because value of ImAddress1 is empty? (ErrorIncorrectUpdatePropertyCount)

查看:83
本文介绍了UpdateItem期间出错,因为ImAddress1的值为空? (ErrorIncorrectUpdatePropertyCount)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我正在尝试更新联系人。此刻我很远,但是当我想传递类似EmailAddresses,ImAddresses或PhysicalAddresses的类型时,我收到以下错误:



"更改说明必须包含一个且仅包含一个要修改的属性"使用相应的ResponseCode:"Microsoft.Exchange.ResponseCodeType.ErrorIncorrectUpdatePropertyCount"




这是我传递的XML


























































































































<? xml 版本 = " 1.0" 编码 = " Windows-1252" ?>
< UpdateItemType xmlns: xsi = " http://www.w3.org/2001/XMLSchema-instance" xmlns: xsd = " http://www.w3.org/2001/XMLSchema" ConflictResolution = " AutoResolve" >
< ItemChanges xmlns = " http://schemas.microsoft.com/exchange/services/2006/messages" >
< ItemChange xmlns = " http://schemas.microsoft.com/exchange/services/2006/types" >
< ItemId Id = " [..]" ChangeKey = " [..]" />
< 更新 >
< SetItemField <跨度style ="color:blue">>
< FieldURI FieldURI = " contacts :GivenName" />
< 联系人 >
< ; GivenName > 某人 < / GivenName >
< / 联系人 >
< / SetItemField >
< SetItemField >
< FieldURI FieldURI = "联系人:姓氏" />
< 联系 >
< 姓氏 />
< / 联系方式 >
< / SetItemField >
< SetItemField >
< IndexedFieldURI FieldURI = " contacts:EmailAddress" FieldIndex = " EmailAddress1" />
< 联络 >
< EmailAddresses >
< 条目 = " EmailAddress1" > some@one.com < / 条目 >
< / EmailAddresses >
< / 联系 >
< / SetItemField >
< SetItemField > ;
< IndexedFieldURI FieldURI = " contacts:ImAddress" FieldIndex = "ImAddress1" />
< 联系 >
< ImAddresses >
< 条目 = " ImAddress1" />
< / ImAddresses >
< / 联系 >
< / SetItemField >
< / 更新 >
< / ItemChange >
< / ItemChanges >
< / UpdateItemType >

解决方案

使用DeleteItemField而不是SetItemField来清除值。

Hi

I'm trying to update contacts. At this moment I'm pretty far but when I want to pass a type like EmailAddresses, ImAddresses or PhysicalAddresses I'm getting the following error:

"An object within a change description must contain one and only one property to modify" with the corresponding ResponseCode: "Microsoft.Exchange.ResponseCodeType.ErrorIncorrectUpdatePropertyCount"

This is my XML that is being passed

<?xml version="1.0" encoding="Windows-1252"?> 
<UpdateItemType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ConflictResolution="AutoResolve"
  <ItemChanges xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"
    <ItemChange xmlns="http://schemas.microsoft.com/exchange/services/2006/types"
      <ItemId Id="[..]" ChangeKey="[..]" /> 
      <Updates> 
        <SetItemField> 
          <FieldURI FieldURI="contacts:GivenName" /> 
          <Contact> 
            <GivenName>Some One</GivenName> 
          </Contact> 
        </SetItemField> 
        <SetItemField> 
          <FieldURI FieldURI="contacts:Surname" /> 
          <Contact> 
            <Surname /> 
          </Contact> 
        </SetItemField> 
        <SetItemField> 
          <IndexedFieldURI FieldURI="contacts:EmailAddress" FieldIndex="EmailAddress1" /> 
          <Contact> 
            <EmailAddresses> 
              <Entry Key="EmailAddress1">some@one.com</Entry> 
            </EmailAddresses> 
          </Contact> 
        </SetItemField> 
        <SetItemField> 
          <IndexedFieldURI FieldURI="contacts:ImAddress" FieldIndex="ImAddress1" /> 
          <Contact> 
            <ImAddresses> 
              <Entry Key="ImAddress1" /> 
            </ImAddresses> 
          </Contact> 
        </SetItemField> 
      </Updates> 
    </ItemChange> 
  </ItemChanges> 
</UpdateItemType> 

解决方案

Use DeleteItemField instead of SetItemField to clear the value.


这篇关于UpdateItem期间出错,因为ImAddress1的值为空? (ErrorIncorrectUpdatePropertyCount)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆