Printing Quote for customer

Arne had a great post before covering the basic of mail merge in CRM. Check it out if you are new to mail merge (

In this article I would like to take you though an important feature “Print quote for customer”. This is essentially a mail merge run on the Quote product entity but available from Quote entity. The Quote entity has one to n relationship with Quote product entity.

The goal of this feature is to enable users to generate a single document containing the summary of all quote products associated with the quote. This single document can be printed or handed to the customer.

There are few subtle differences in how this feature differs from the other mail merge implementations in CRM.

a) Field selection for data source field.

    - Like mail merge from other entities, the user can select fields from the primary entity in this case “quote”, its related entities and the current user fields.

    - Then they also have an option of selecting fields from associated quote product and related product of associated quote product. This is the only place where we do reverse relationship look up and multiple hops in the relationship tree for fetching data for data source.


b) Merge type (or) Document type (as Microsoft Word calls it).

    - The document type is set to directory. A MSDN article on using directory mail merge can be found at


c) Generates one final document.

    - As compared to others (letter, labels etc) where one document for each selected row in the data source is created, the directory mail merge will merge all data from the data source into one document.

d) Use of Word fields in the mail document.

    - The directory mail mere will not retain any headers and footers information. So the only way to insert them is via the use or Word fields like MERGESEQ and IF conditions.

    - A MSDN article on word fields can be found at

Note: The Microsoft Word shortcut for hide/show of merge fields is Alt+F9

e) Special “LastItem” field in the data source.

    - There is a special field with name “LastItem” added to exported data source. The value of this column is 0 or 1; where 1 represent that last record in the data source.

    - The header information of the document can be inserted using a condition like { IF {MERGESEQ = "1" "…”} but there is no support for identifying the last record in the mail merge of which the footer information can be inserted.

    - The last item field comes handy in this situation. It enables users to insert footer information into the document by placing a condition like { IF { MERGEFIELD “LastItem” = "1" "…”}.

    - Check out the default mail merge template “Quote for customer” that ships with CRM for an example on how it’s used.


f) Tracking in CRM.

    - Generated mail merged documents can be tracked into CRM when mail merge is run from the outlook client. The tracking in this case is done by creating a task record on the quote entity from which the functionality is invoked. The final generated document is located as an attachment on the created task.


g) Mail merge template.

    - Like other mail merges, user can upload mail merge template documents to CRM that can be shared and used in latter “Print quote for customer” runs. The associated entity for these mail merge template records is set to “Quote”.



Shashi Ranjan

Comments (5)

  1. Steve Noe says:

    Great overview! I have posted some sample quote templates based on the CRM 4.0 supplied on on my blog at:


    Steve Noe, MCT/CRM

  2. Microsoft Dynamics CRM Online is a fantastic CRM platform for most small medium businesses – it is so

  3. Andy Rooms says:

    So my big question is: "Can we do a similar catlog mail merge to our own custom entities using a 1:n relationship?"

    Specifically I want to print a list of delivery dates (custom entity) that pertain to a single customer (Contact) record.

    Can I do this, or is this 1:n relationship hard-wired into Dynamics CRM 4.0 and only for use with the Quote mail merge…?

  4. Sanjay says:

    When the Quote is to be emailed out, each product chosen goes out as a separate email. Is there a way to send it out as a single quote?

Skip to main content