Category Archives: Others

CRM Mail Merge Letter Printing Issues

Today we came across interesting problem regarding mail merge letter with regards to Dynamics CRM.

We were generating customer letter from Dynamics CRM Mail merge.

Our letter was four page letter and we had mail merge template setup and letter generated fine.

But while printing we wanted to print first page of company letter pad and other one on normal page. Well if you just print the mail merge generated letters then it consider the entire letter as one document and print them in just one print job.

So we used to get only first page of first letter on company letter page while others are printing normally which is not correct…

Well after much investigation (or should I say trial and error method) we found the solution and following steps to achieve the same..

1. Open Relevant word Document or Letter
2. Alt + F11 to open the Visual Basic Editor.
3. Module -> Insert Module
4. Copy following code and past in there…

Option Explicit
Sub PrintSectionsToSubDoc()
Dim i As Long
For i = 1 To ActiveDocument.Sections.Count
ActiveDocument.PrintOut Range:=wdPrintFromTo, From:="s" & i, To:="s" & i
Next i
End Sub

5. Close the Visual Basic Editor

6. Go to View -> Macros (or Tool-> Macro -> Macros for Office 2K3 ) and double click PrintSectionsToSubDoc()

Cheers,
Mayank 🙂

Advertisements

CRM 4.0 Loading Live Environment Data to Test/Dev

This is most questions or scenario we encounter I had encounter while working CRM and that is we want to load Live Environment Data to Test/UAT or Development environment.

I decided to give it go and following are detailed step to achieve this in CRM 4.0.

STEP 1: Back up existing Live Database

STEP 2: Restore this database on Dev/Test Database Server. Let’s assume our development database server name SQLDEV and we restored this database with name SQLDEV_MSCRM. It is important to have last string in database name as _MSCRM.

STEP 3: Log in to CRM Deployment Manager

STEP 4: Click on Organizations and then click Import Organization (right hand side)

STEP 5: then select the source SQL Server and source database (as shown in figure below) and click Next

STEP 6: then select the report Server name and generally it would be database server so in out case it would be http://SQLDEV/reportserver and then click Next

STEP 7: Now select the mapping of user as per your requirement, you create mapping file and use that for user mapping. For this example we will keep it simple and just use to auto map users using AD account name and click Next.

STEP 8: System will show you entire list of mapped user and allow you edit user mapping as well. Then we can click next and if any of users does not mapped then system will give warning for the same. Ignore warning and click yes because we can map this manually later on…

STEP 9: System check all system requirements for SQL Server and Reporting Services and then click next
STEP 10: the system will show you Ready to install screen with all summary of new CRM Organisation. Click Import button. System will then create new dev environment with live data.
STEP 11: Done, You will see the success screen and if there is any problem you can check installed log file and the correct problem and start again.
STEP 12: Log on to new environment using URL
http://ServerName:port/Organisation name/loader.aspx

Note:-
1. You need to be Active directory administrator to be able to do this.
2. This will not do any extra add-ons or custom development which is not part of database so you will need to manually do this on new CRM Environment.