这是可能的,但你必须通过整个阵列。
所以第一部分:我假设你知道如何识别插件内的数组。
第二部分:你已经知道如何查询联系人实体特定的e-mail地址
第三部分:只是重复的例子,你发现找contact.emailaddress =“[email protected]”为您拥有的电子邮件地址阵列中的每个项目。
foreach (string email in emailAddressArrayFrom3rdPartyTool)
{
//Query for the contacts that match that e-mail address here
//Update Contacts so that the e-mail address is removed.
}
您还可以定义一个列表,并与要更新联系人填充它。然后,您可以在追踪所有记录时调用更新。
更新:您还可以去获取XML路线:(更多资讯:http://msdn.microsoft.com/en-us/library/gg328117.aspx)
string fetch = @"
<fetch mapping='logical'>
<entity name='contact'>
<attribute name='contactId'/>
<filter>
<condition attribute='emailaddress' operator='in'>
<value>List of Array emails here</value>
<value>List of Array emails here</value>
<value>List of Array emails here</value>
</condition>
</filter>
</entity>
</fetch> ";
EntityCollection result = _serviceProxy.RetrieveMultiple(new FetchExpression(fetch));
foreach (var c in result.Entities)
{
System.Console.WriteLine(c.Attributes["name"]);
}
发布您的代码。 – Daryl