Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8576081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:50:39+00:00 2026-06-11T19:50:39+00:00

I’ve been trying to get the Merge example in Dynamics CRM 2011 SDK to

  • 0

I’ve been trying to get the Merge example in Dynamics CRM 2011 SDK to work.
http://msdn.microsoft.com/en-us/library/hh547408.aspx

I’ve modified it a bit. I’ve created two Contacts instead of Accounts (although some variable names in the code might suggest otherwise. For example _account1Id is in fact a GUID for contact1.)

The first Contact record has name, surname and telephone fields filled.
The second Contact record has name, surname and email fields filled.

The part where merge occurs is below. The original code can bee seen from the link at the top.

When I run the example with following modifications, the e-mail address doesn’t get merged into the new contact record. What I get is one merged Contact with the values from one of the records, with address data added, but no e-mail. I thought this was supposed to fill empty fields of the primary record with the non-empty fields from the second record.

Being very new to Ms Dynamics CRM, I couldn’t understand the reason after much googling and debugging. I’ll be glad if someone can give me some feedback about what the problem might be.

Thanks in advance.

      _serviceProxy.EnableProxyTypes();
            CreateRequiredRecords(); // created two contacts with same name, surname. first record has telephone1 filled, second record has emailaddress filled.
            EntityReference target = new EntityReference();
            target.Id = _account1Id;
            target.LogicalName = Contact.EntityLogicalName;
            MergeRequest merge = new MergeRequest();
            merge.SubordinateId = _account2Id;
            merge.Target = target;
            merge.PerformParentingChecks = false;
            Contact updateContent = new Contact();
            updateContent.Address1_Line1 = "test";
            merge.UpdateContent = updateContent;
            MergeResponse merged = (MergeResponse)_serviceProxy.Execute(merge);
            Contact mergeeAccount =
                (Contact)_serviceProxy.Retrieve(Contact.EntityLogicalName,
                _account2Id, new ColumnSet(allColumns: true));
            if (mergeeAccount.Merged == true)
            {
                Contact mergedAccount =
                    (Contact)_serviceProxy.Retrieve(Contact.EntityLogicalName,
                    _account1Id, new ColumnSet(allColumns: true));
            }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T19:50:40+00:00Added an answer on June 11, 2026 at 7:50 pm

    That behaviour would be as expected – the Merge will move over child records for you from the subordinate to the master (so potentially opportunities, addresses etc.) but not try to workout which fields you want copied over. The reasoning (I would guess) is the potential business logic implications are endless – do you want to copy over emails? what if all email fields are filled? what about custom fields? And lots of other cases I’m sure everyone can think of.

    Edited:

    To workaround this, there is a property on the MergeRequest class called UpdateContent. If you update fields on this property, the values will be merged into the parent record.

    You can actually see this in the link you has posted:

    // Create another account to hold new data to merge into the entity.
    // If you use the subordinate account object, its data will be merged.
    Account updateContent = new Account();
    updateContent.Address1_Line1 = "test";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to select an H1 element which is the second-child in its group

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.