Microsoft Knowledge Base Email Alertz

(929871) - Describes a problem that occurs because you cannot merge lookup fields in Microsoft Dynamics CRM. A workaround is provided.

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 929871 - Last Review: September 11, 2011 - Revision: 4.0

Lookup field values are not merged in Microsoft Dynamics CRM 3.0

Important This article contains information about how to modify the registry. Make sure that you back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:
256986  (http://kbalertz.com/Feedback.aspx?kbNumber=256986/ ) Description of the Microsoft Windows registry

SYMPTOMS

Consider the following scenario in Microsoft Dynamics CRM 3.0. You populate the lookup field values for accounts, for contacts, or for leads. Then, you try to merge two accounts, two contacts, or two leads. In this scenario, the lookup field values are not merged.

CAUSE

This problem occurs because you cannot merge lookup fields in Microsoft Dynamics CRM 3.0.

WORKAROUND

Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall the operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.

To work around this problem, use a pre-merge callout to merge the values for the lookup fields. To do this, follow these steps:
  1. Download the preMergeCallout source code. The following file is available for download from the Microsoft Download Center:

    Collapse this imageExpand this image
    Download
    Download the 929871_preMergeCallout.zip package now. (http://download.microsoft.com/download/f/4/f/f4fdab0d-6bf6-4fba-8dac-cec68118cad4/929871_preMergeCallout.zip)

    Release Date: July 10, 2007

    For more information about how to download Microsoft support files, click the following article number to view the article in the Microsoft Knowledge Base:
    119591  (http://kbalertz.com/Feedback.aspx?kbNumber=119591/ ) How to obtain Microsoft support files from online services
    Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help prevent any unauthorized changes to the file.
  2. Extract the contents of the 929871_preMergeCallout.zip file to a folder on a computer that has Microsoft Visual Studio .NET 2003 installed.
  3. In Windows Explorer, open the folder to which you extracted the files in step 2. Then, double-click the PreMergeCallout.sln file. This file is the Visual Studio .NET solution.

    Notes
    • The preMergeCallout project opens in Visual Studio .NET.
    • The CrmPreMerge.cs file contains the logic for the callout. No changes are needed for the solution to work.
  4. In Visual Studio .NET, click Build, and then click Build Solution.
  5. In Windows Explorer, open the folder to which you extracted the files in step 2. Open the Bin folder, and then open the Debug folder.
  6. Copy the PreMergeCallout.dll file to the following Microsoft Dynamics CRM server folder:
    Program Files\Microsoft CRM\Server\bin\Assembly
  7. In the root directory of the PreMergeCallout project folder, copy the Callout.config.xml file to the following Microsoft Dynamics CRM server folder:
    Program Files\Microsoft CRM\Server\bin\Assembly
  8. On the computer that is running the Microsoft Dynamics CRM server, click Start, click Run, type regedit in the Open box, and then click OK.
  9. Locate the following registry key, and then select the following registry key:
    HKEY_LOCAL_MACHINE\Software
  10. Right-click Software, point to New, and then click Key.
  11. Type CrmPreMerge, and then press ENTER.
  12. Right-click CrmPreMerge, point to New, and then click String Value.
  13. Type ServerURL, and then press ENTER.
  14. Right-click ServerURL, and then click Modify.
  15. In the Value data box, type the URL of the computer that is running the Microsoft Dynamics CRM server, and then click OK. For example, the URL may resemble the following URL:
    http://CRMServerName:port_number
  16. On the File menu, click Exit.
When you merge a contact, an account, or a lead in Microsoft Dynamics CRM, the callout code will run. After the merge operation is successfully completed, there may be lookup field values that are not populated on the Master record. But, these lookup field values are populated on the subordinate record. These lookup field values are moved from the subordinate record to the master record.

Notes
  • If you want different logic to occur when the merge occurs, you must edit the CrmPreMerge.cs file in Visual Studio .NET 2003.
  • If you build the project by using Microsoft Visual Studio 2005, the callout may not work. This problem occurs because Visual Studio 2005 uses the Microsoft .NET Framework 2.0. Microsoft Dynamics CRM 3.0 uses the Microsoft .NET Framework 1.1.

APPLIES TO
  • Microsoft Dynamics CRM 3.0
Keywords: 
kbexpertisebeginner kbtshoot kbmbsmigrate kbprb kbexpertiseinter KB929871
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate