Document generation

11
Document Generation in Dynamics CRM 2016 In the latest release of Dynamics CRM, the 2016 release, Microsoft has improved the out-of-the-box capabilities to generate documents that contain data from CRM records. Where users can now create Word and Excel templates for letters, agreements, quotes, invoices and other documents to be created in just a single click! These template are easy to open with CRM data populated within the document. Out of the box Templates Out of the box, here are the templates Microsoft includes with the CRM 2016 release Figure 1.0 1 To run the Template you’ll first need to select the appropriate record. For the Account Summary Template, select an Account record and select it from the Action menu. As shown in Figure 2.0 1. Figure 2.0 1

Transcript of Document generation

Page 1: Document generation

Document Generation in Dynamics CRM 2016

In the latest release of Dynamics CRM, the 2016 release, Microsoft has improved the

out-of-the-box capabilities to generate documents that contain data from CRM

records. Where users can now create Word and Excel templates for letters, agreements,

quotes, invoices and other documents to be created in just a single click! These

template are easy to open with CRM data populated within the document.

Out of the box Templates

Out of the box, here are the templates Microsoft includes with the CRM 2016 release

Figure 1.0 1

To run the Template you’ll f irst need to select the appropriate record. For the Account Summary Template, select an Account record and select it from the Action menu. As shown in Figure 2.0 1.

Figure 2.0 1

Page 2: Document generation

Account (Cloudfronts Technologies LLP) Summary template is generated.

Figure 3.0 1

Open the Account Summary.docx file.

Figure 4.0 1

Page 3: Document generation

Create a new Excel Template

Go to Settings – Templates – Document Templates. Click on +New to launch the

wizard.

Here you can select either Excel or Word templates, the entity and the View. The Edit

Columns link provides users a quick way to add columns to the template similar to that

of an Advance Find. CRM knows where to display the template file based on the entity

selection.

If you already have a template, choose Upload, otherwise choose Download to see

what CRM created as the Template based on your field selections.

Figure 5.0 1

Page 4: Document generation

To upload a file we need to just drag & drop in the box and click the upload button

Figure 6.0 1

Once the upload is complete, the template record is displayed.

Figure 7.0 1

Page 5: Document generation

Once you have selected the Template, you also have the ability to set the security roles

and control.

Figure 8.0 1

Create a Word Template

Go to Settings – Templates – Document Templates and click +New. Chose the

Word Template, select the entity and press Select Entity button.

Figure 9.0 1

Page 6: Document generation

A wizard form opens to provide options in navigating across various entities

depending on the relationship types.

Figure 10.0 1

The relationships you select on this screen determine what entities and fields are

available later when you define the Word template. Only select relationships you need

to add CRM data to the Word template.

Click Download Template on the Select Entity page to create a Word file on your

local computer with the exported entity included as XML data.

Enable the Developer Tab

Open the Word template file. At this point, the document appears to be blank.

Figure 11.0 1

For To see and add CRM XML data, you need to enable the Word Developer tab.

Page 7: Document generation

Go to File > Options > Customize Ribbon, and then enable Developer.

Figure 12.0 1

Developer now appears in the Word ribbon.

Figure 13.0 1

You use the XML Mapping Pane to add CRM entity fields to your Word template. Be

sure to only add fields as Plain Text or Picture.

Figure 14.0 1

Page 8: Document generation

Define the Word template

Use the XML Mapping Pane to define the Word template with CRM entity fields.

1. In your Word template, click Developer > XML Mapping Pane

Figure 15.0 1

The default XML schema is selected.

2. Select the CRM XML schema. It will begin with “urn:microsoft-crm/document-

template/”.

Figure 16.0 1

Page 9: Document generation

3. Expand the CRM entity, right-click the entity field, and then click Insert Content

Control > Plain Text.

Figure 17.0 1

The CRM entity field is added to the Word template. Add additional entity fields, add

descriptive labels and text, and format the document.

A completed template might look like this:

Figure 18.0 1

Some content control fields you entered likely have multiple lines of data. For example,

accounts have more than one contact. To include all the data in your Word template,

set the content control field to repeat.

Page 10: Document generation

Set content control fields to repeat

1. Put fields with repeating data in a table row.

2. Select the entire table row in the template.

3. In the XML Mapping Pane, right-click the relationship containing the content

control fields, and then click repeating.

Figure 19.0 1

When you use the Word template in CRM to create a document, the table will populate

with multiple rows of data.

When the template has the fields and formatting you want, save it and upload it into

CRM.

Upload the Word template back into CRM

When you have your Word template built the way you want, save it so you can upload

it into CRM.

To use the Word template you've created, do the following:

1. Open a record with information you want to create a document. For example,

open a customer account record in Sales.

Page 11: Document generation

2. Click More (…) > Word Templates, and then under Word Templates select

the template you created.

Once generated, documents can be downloaded and then printed, shared,

emailed or collaborated on with Microsoft Office 365