开发者

Merge Account Detail Using CRM 4.0 Webservice if account exist

开发者 https://www.devze.com 2023-03-05 10:02 出处:网络
Need advise I am currently using CRM4.0 webservice to create account from reading my staging table which stored new account informations. I know there i开发者_StackOverflow中文版s a Create Duplicate

Need advise I am currently using CRM4.0 webservice to create account from reading my staging table which stored new account informations. I know there i开发者_StackOverflow中文版s a Create Duplicate Optional Parameter(false) which help to validate existing records. I need to check is there is also a function to merge the existing account with the new account enter?

If had do you guys have any sample or reference that i could use.Thanks Guys and ladies, I have been googling all afternoon and found no articles.

Thanks Brandon


You have to send a Merge Message which could be issued with an MergeRequest

See following example which is included in the 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);
0

精彩评论

暂无评论...
验证码 换一张
取 消