Merge Message
Merges the information from two entity instances of the same type.
The relevant classes are specified in the following table.
The following table shows the entities and target classes for this message.
Remarks
For a description of how actions on a parent instance affect child instances, see Cascading Rules.
For a list of required privileges, see Merge Privileges.
Example
The following code example shows how to use the Merge message.
[C#]
// Set up the CRM Service.
CrmService service = new CrmService();
service.Credentials = System.Net.CredentialCache.DefaultCredentials;
// 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 = "54321 NE Main St";
merge.UpdateContent = updateContent;
// Execute the request.
MergeResponse merged = (MergeResponse)service.Execute(merge);
[Visual Basic .NET]
' Set up the CRM Service.
Dim service As New CrmService()
service.Credentials = System.Net.CredentialCache.DefaultCredentials
' Create the target for the request.
Dim target As 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.
Dim merge As 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
Dim updateContent As New account()
updateContent.address1_line1 = "54321 NE Main St"
merge.UpdateContent = updateContent
' Execute the request.
Dim merged As MergeResponse = CType(service.Execute(merge), MergeResponse)
Related Topics
CrmService Messages
© 2007 Microsoft Corporation. All rights reserved.