I wanted to convert some code I had in a CRM 4 organisation into CRM 2011. I initially tried copying the customizations.xml and moving the entity and entityRelationship and form into CRM 2011 customizations.xml in the solution but I couldn’t get this to work. It makes sense because CRM 2011 has the ribbon and the forms are different so i wasn’t very hopeful.
I didn’t want to have to type in all the fields and relationships for the entity I wanted so I thought I would import the organisation into CRM 2011 and then export it from there.
I found a couple of great articles to run through the process.
First there are a couple of videos. The first one is a real whizz through the process and it’s less than 3 minutes
Importing a Dynamics 4 organisation into CRM 2011
This is the channel 9 video and is 17 minutes long and explains in detail what you need to do and the logic behind it
You probably want to watch the video above if some of your plugins, custom code isn’t working.
The video’s are good but the best I also found this blog post very useful Larry Lentz
Importing CRM 4.0 Organization into CRM 2011
The other day I blogged about Installing CRM 2011 RC On-Premise. Last night I decided to add some data to my initial test installation by importing my production CRM 4.0 data into my test CRM 2011 deployment. I was also curious as to how easy it would be to add version 4.0 data to 2011. In version 4.0 one is able to Import Organization and add a CRM organization from another deployment to an existing deployment (best to be running the Enterprise edition to do this). This is done using the Deployment Manager on the CRM server. CRM 2011 also has the Deployment Manager.
The Deployment Manager is installed on the CRM server when CRM is installed. The Active Directory user who installs CRM is automatically made a Deployment Administrator. There must be at least one Deployment Administrator and you can add others as you require. Deployment Administrators typically do not need to be users in the CRM. They can be any network user in your Active Directory. I’ve highlighted typically for a reason as you’ll see as we progress. If you are running the Enterprise version of CRM 4.0 you can have multiple organizations. In CRM 2011 this is available in the standard server version, but not the Workgroup Edition. New organizations can be created using the Deployment Manager, or existing organization databases can be imported. My goal was to see if I could import my CRM 4.0 data into a new organization in CRM 2011.
The first step was to make a backup of my CRM 4.0 SQL data using the SQL Server Management Studio. I won’t go into details of that process here but leave that up to you. Then I copied the backup file (only theOrganizationName_MSCRM database is needed) over to my CRM 2011 server and used Restore Database add the database to the new server.
On the CRM server I started Deployment Manager, selected Organizations from the navigation pane, and selectedImport Organization. I was prompted for the SQL server and the CRM database to import. Actually my deployment was smart enough to default to the SQL server for my CRM 2011 test deployment and the CRM database I’d just restored. I’ll not detail the steps necessary to run the import. The wizard walks you through everything. I did get a few warnings from the Environment Diagnostic Wizard though, mainly having to do with, I believe, the differences between my v4.0 and 2011 environments. One had to do with the language packs. Perhaps it would be best to disable or even uninstall any language packs before making your CRM 4.0 SQL backup.
Part of the import process links users in the imported database with users in your Active Directory. This allows one to import an organization from a completely foreign domain. I kept receiving an error that at least one user had to be assigned the System Administrator role (“You must map your Active Directory user account to at least one enabled Microsoft Dynamics CRM user who has the System Administrator role before the organization can be imported”). Long story made short, the Administrator account in my CRM 4.0 deployment was a System Administrator but was assigned the Restricted Access Mode. I changed this to remove the Restricted Access Mode (actually a hold over from v3.0) and made sure the license Access Mode was set to Full. I then backed up my CRM 4.0 SQL data and restored it again on my CRM 2011 server. This time the import process sailed through the user phase.
After getting my users to match, I figured it would be a quick process to complete the importation. Not so! The process took an amazing amount of time preparing the database for import and appeared to hang on the ‘Delete completed old asyncoperation records’ stage. This alone took almost 3 hours! I received a tip via Twitter from @ccellarsuggesting I clean up the asyncoperationbase table before doing an import and supplied a link to a KB on the process. Thanks, Christoph. I’ll blog about that when I do my next test import.
Once the asyncoperation phase was completed, the import went along much quicker, though it did still take a while and I went to bed way before it finished. But it did complete and now I have my CRM 4.0 database nicely restored and running in my test CRM 2011 deployment. I’ll go though this again for practice, removing the language packs (well at least disabling), and taking care of the asyncoperationbase table. I’ll let you know how it goes.