- Blog


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 Blog


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 use aggregation properly when creating templates

Aggregated fetches are a useful functionality when you create templates. Please click here to get an overview on aggregation in DocumentsCorePack.  This article provides you with a step-by-step tutorial on how to work properly with aggregation.

Step 1: Open the Template Designer
Please open MS Word, navigate to the and click on the
[Insert MailMerge fields]-button. The DocumentsCorePack Question Dialog opens. Click on the [Yes]-button in order to open the DocumentsCorePack Template Designer.

Figure 1: Open the Template Designer

Step 2: Open the Configure Fields and Datasource dialog
In the so opened Template Designer, select the entity type you would like to work on (in our example we use Account) click on the Additional-tab and click on the
[Add Relationship/Entity]-button.

Figure 2: Resolve a relationship

Step 3: Activate aggregation
In the so opened dialog, select a relationship in the drop down menu (in our example Account –> Contact [parentcustomerid] and check the acitvate aggregation functionality.

Figure 3: Activate agregation

Step 4: Set the aggregation functionality  
In the window that opens now, you can set certain aggregation functionalities.
The attribute-drop down menu enables you to select an attribute-field, while the aggregate/group by drop down menu provides you with an overview on which aggregation functionalities can be appied to this field.
Please note: The possible aggregation functionalities depend on the attribute-field you select.

Figure 4: Set the aggregation functionality

Click on the [OK]-button in order to proceed. 

Step 5: Insert the newly resolved relationship
Now click somewhere into your template and double-click on the field of the new relationship on the right side.
Figure 5: Insert resolved relationship

As figure 5 displays, the relationship consists of two parts: 
First name (count) 
While first name is the name of the field, the item in brackets explains the aggregation functionality that has been applied to the relationship.
Now insert your preferred table settings and click on the [OK]-button.

Step 6: The result
We decided to insert a table with a header in our example. The resolved relationship has been added to our template.

Figure 6: The result

Well done! Now make sure that you save your template. Then merge it with CRM data and test it if you want to. If you haven’t ever merged and/or tested a template before, please have a look at this article.

That’s it! We appreciate your feedback! Please share your thoughts by sending an email to

Comments are closed.