Microsoft KB Archive/929871

= Lookup field values are not merged in Microsoft Dynamics CRM 3.0 =

Article ID: 929871

Article Last Modified on 8/15/2007

-

APPLIES TO


 * 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 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:  Download the preMergeCallout source code. The following file is available for download from the Microsoft Download Center:

Download the 929871_preMergeCallout.zip package now.

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 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. Extract the contents of the 929871_preMergeCallout.zip file to a folder on a computer that has Microsoft Visual Studio .NET 2003 installed. 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. </li> In Visual Studio .NET, click Build, and then click Build Solution.</li> 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.</li> Copy the PreMergeCallout.dll file to the following Microsoft Dynamics CRM server folder:

Program Files\Microsoft CRM\Server\bin\Assembly

</li> 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

</li> 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.</li> Locate the following registry key, and then select the following registry key:

</li> Right-click Software, point to New, and then click Key.</li> Type CrmPreMerge, and then press ENTER.</li> Right-click CrmPreMerge, point to New, and then click String Value.</li> Type ServerURL, and then press ENTER.</li> Right-click ServerURL, and then click Modify.</li> 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:// :

</li> On the File menu, click Exit.</li></ol>

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.

Additional query words: crm3 crm30 crm3.0

Keywords: kbexpertisebeginner kbtshoot kbmbsmigrate kbprb kbexpertiseinter KB929871

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.