Wednesday, October 19, 2011

CRM 4.0 migration to CRM 2011

Backup CRM 4.0 SQL Server database

1. Open SQL Studio Manager
2. Connect to CRM 4.0 database
3. Expand Databases
4. Right-click on xxxxxx_MSCRM database, Tasks -> Back Up
5. Back Up to Disk (dbname.bak)

Restore CRM 4.0 database in CRM 2011 SQL Server

1. Open SQL Studio Manager
2. Connect to CRM 2011 database
3. Right-click on Databases, Restore Database
4. To Database - type in new crm database name, From Disk - select backup you created (dbname.bak) from CRM 4.0 SQL Server

Import new database with CRM 2011 Deployment Manager

1. Run CRM 2011 Deployment Manager (Start->All Programs->Microsoft Dynamics CRM->Deployment Manager)
2. Organizations -> Import Organization
3. Select database you restored in CRM 2011 SQL Server
4. Type in Display name and Unique Database Name (of your choice)
5. Type in CRM 2011 Report Server URL
6. Select "Automatically Map Users" (if you are in the same domain)
7. If some user doesn't exist in new CRM 2011 you can create them in Active Directory and then map them or just ignore this and go further.
8. System checks all prerequisites for Import.
9. *.If there are no errors you can click Import (Import can take up to some hours, depending on your db size and customizations etc).

*. If you see warning "Fragmented indexes were detected in the Microsoft Dynamics CRM database", you can ignore this message and go further but i would suggest you to do following as it greatly can impact the overall import process time: This error message says that there are fragmented indexes. To rebuild these indexes you can use this link:

http://crrm.ru/articles/2011/05/index-optimization-before-in-place-upgrade-to-crm-2011 (In Russian)
 
1. Download all 3 files from this link above (IndexOptimize.sql, CommandExecute.sql, DatabaseSelect.sql)
2. Open them via SQL Studio Manager and execute them: At very begining of each script add these two lines to select your CRM 4.0 database for creating these stored procedures -
  
   USE <xxxxx_MSCRM>
   GO

3. And finally run this script to rebuild indexes:
   
   EXECUTE dbo.IndexOptimize @Databases = 'orgname_MSCRM',
    @FragmentationHigh = 'INDEX_REBUILD_ONLINE,INDEX_REBUILD_OFFLINE',
    @FragmentationMedium = 'INDEX_REORGANIZE',
    @FragmentationLow = NULL

4. And then proceed with Import.

Monday, July 25, 2011

Sharepoint 2010 Server install Step By Step

In my previous post Sharepoint 2010 Foundation Install Step By Step we went through the steps to install SharePoint 2010 Foundation, so this time we will go through SharePoint Server 2010 installation process.

there is practically no difference between SPF 2010 & SPS2010 installation, except of some new error messages :)

So here we go

Thursday, July 7, 2011

CRM email with pdf report attachment

1.step: In Visual Studio creating new WORKFLOW ACTIVITY LIBRARY
2.step: Add references Microsoft.Crm.Sdk, Microsoft.Crm.SdkTypeProxy;
3.step: Add web reference http://<reportservername>/ReportServer/ReportExecution2005.asmx
4.step: Debug this code
5.step: Run Plugin Registration Tool and register new assembly (that will be dll created from this source in path where this project will be created in bin folder)
6.step: Create new Workflow in crm with this custom workflow activity as new step

And here goes full code:

Wednesday, May 25, 2011

CRM in FireFox

If your preferred browser is not IE.. :) then there is great solution to work with Microsoft Dynamics CRM in Mozilla FireFox - "IE TAB" Add-on.

To use this add-on:
1. download add-on
2. restart FireFox
3. Tools -> IE Tab 2 options
4. Add your CRM site url to "Sites Filter" section

That's it, CRM in FireFox


Wednesday, May 18, 2011

CRM FetchXml with Javascript

FetchXML method using javascript in CRM, allows me to use linked entities, so I can query attributes from different tables and linke them together with some primary attribute. 

Here's example:

// Prepare variables
var fetchMapping = "logical";
var entityName = "entitiyname";
//first attribute to fetch from this entity [CHANGE THIS]
var FirstColumn = "attributename1"; //first attribute to fetch from this entity [CHANGE THIS]
var SecondColumn = "attributename2"; //second attribute to fetch from this entity [CHANGE THIS]
var ThirdColumn = "attributename3"; //third attribute to fetch from this entity [CHANGE THIS]