mscrm-addons.com - Blog

IMPORTANT INFORMATION

This blog is deprecated since July 2020.The articles below are no longer maintained and might contain outdated information. 
You can find the most acutal and relevenat information in our Knowledge Base at support.mscrm-addons.com

News.mscrm-addons.com Blog

rss

Hello and welcome to our blog! What can we do for you? Are you looking for further technical information or step-by-step instructions to our products? Or would you like to read the latest news on mscrm-addons? Please feel free to browse our blog for detailed information and to share our posts!


How to create DocumentsCorePack templates

Office Open XML has been invented to enable the creation of very complex templates that would normally require the use of macros. This article contains a step-by-step description about how to create such a template.

As for demonstration purpose, we decided to create a so called quote-with-grouping-template in this example, because it is most likely used by Microsoft Dynamics CRM users.

(Quote-with-grouping means that the quote-products are grouped by the value of a specific CRM-attribute, for example, subject.)

Step 1: Create a template layout by selecting an entity

First, we need to create the basic layout of the template. Clicking on the
[Insert MailMerge Fields]-menu button in the www.mscrm-addons.com command bar will open the DocumentsCorePack Template Designer.

Now, to create the basic layout for, e.g. a quote-with-grouping-template, we must select the type Quote in the Type-Selector-Dropdown Menu. Each template is based on a specific entity.


Figure 1: Template Designer – Selected entity: Quote

Step 2: Insert Fields

Now that we have selected an entity, we need to insert fields to our template. To do so, we set the cursor at the position where we would like to insert a certain field. Then, we double click the fieldname. You could as well insert it via the [Insert field]-button. For more information on the [Insert field]-button, have a look at this article.

Figure 2: Template Designer – Insert fields

Once you have inserted all the fields you would like to insert, your template could look like this:

Step 3: Add line-item relationship

The next step is to resolve the quote-quote product relationship. To do so, we need to click on the Additional-tab in the DocumentsCorePack Template Designer. The Additional section allows to resolve any relation/entity within CRM and brings up a list of all attributes from the related entities so that they can be used within the document too.

Here, we click on the [Add Relationship/Entity]-button in order to add a new relationship.

Figure 4: Template Designer – Additional tab

We use the Configure fields and data source – dialog to resolve the fields, tables and relationships we need for our document.


Figure 5: Configure fields and data source dialog

In our example we must select Quote -> Quote Product [quoteid]. As a result, the available fields of this relationship are displayed in the Attributes field of the Configure fields and data source dialog.


Figure 6: Configure fields and data source dialog with selected relationship

As soon as we click on the [OK]-button, all the selected fields will be related to the Quote Product table. Please note: Only the fields checked in the Attributes field will later be visible in the DocumentsCorePack Template Designer.


Figure 7: Template Designer – Additional tab/fields related to Quote Product (table 1)

Step 4: Insert the table

The procedure of inserting a table of items is completely automated, so we just need to set the curser to the position where we want to add the table and double click on one of the fields that we have previously added to the table. As soon as we do so, a dialog (see Figure 8) appears.


Figure 8: Insert new table

Within this dialog, you can select between three possibilities how the fields should be inserted to the table.

In our example, we want to insert a new table with a header and a footer. So we select the corresponding options and click on the [OK]-button.

As a result, the table will be inserted at the determined position:


Figure 9: Insert table (Result)

Step 5: Format the table

Once we have inserted the table, we can add fields like quantity, product-name or even a table header including column-names with the formatting options available in the www.mscrm-addons.com - tab.

 Figure 10: mscrm-addons.com-tab (Rows and Columns)

With a click on the Rows and Columns – Dropdown, you get the possibility to split or merge the columns, to insert a right or left column, to delete a row or a table and to add a header or a footer row.

Figure 11: Column customization

Please note: It is of upmost importance to insert the header, as well as the footer, exclusively via the www.mscrm-addons.com – tab in the command bar! Do not enter them via Microsoft Word!

Step 6: Get the result

After saving the document and selecting our CRM-data we can see the result with the replaced fields at the top, the line item table including the sum in the middle and the bank-details at the bottom.

Figure 12: DocumentsCorePack template – Result

That is how you create a DocumentsCorePack template!

That’s it! We appreciate your feedback! Please share your thoughts by sending an email to support@mscrm-addons.com.




Comments are closed.