如果存在帐户,则使用CRM 4.0 Webservice合并帐户详细信息

时间:2011-05-13 09:51:54

标签: web-services dynamics-crm-4

需要建议 我目前正在使用CRM4.0 webservice通过阅读存储新帐户信息的临时表来创建帐户。我知道有一个Create Duplicate Optional Parameter(false)有助于验证现有记录。我需要检查是否还有一个函数将现有帐户与新帐户合并?

如果有你们有任何我可以使用的样品或参考文件。感谢男士和女士们,我整个下午都在谷歌搜索,没有发现任何文章。

由于 布兰登

1 个答案:

答案 0 :(得分:1)

您必须发送Merge Message,该MergeRequest可以通过{{3}}

发出

请参阅以下SDK中包含的示例

// Create the target for the request.
TargetMergeAccount target = new TargetMergeAccount();
// EntityId is the GUID of the account that is being merged into.
target.EntityId = new Guid("2B951FBC-1C56-4430-B23B-20A1349068F3");

// Create the request.
MergeRequest merge = new MergeRequest();
// SubordinateId is the GUID of the account merging.
merge.SubordinateId = new Guid("AD618DB2-F0DB-4A6A-8C4B-2F2213EAA38E");
merge.Target = target;
merge.PerformParentingChecks = false;

account updateContent = new account();
updateContent.address1_line1 = "test";
merge.UpdateContent = updateContent;

// Execute the request.
MergeResponse merged = (MergeResponse)service.Execute(merge);