• Documentation
  • Back to www.mscrm-addons.com
  • Documentation
  • Back to www.mscrm-addons.com
home/Knowledge Base/Template Designer(DCP)/How do I create relationships using DocumentsCorePack Template Designer? (Advanced)

How do I create relationships using DocumentsCorePack Template Designer? (Advanced)

814 views 0 Updated on February 24, 2022

This article outlines how to create – more or less complex – relationships in the DocumentsCorePack (DCP) Template Designer.
The following three Step by step-tutorials will teach you how to create and manage – more or less complex – relationships with the DCP Template Designer Additional-tab. Basically, relations can be solved for 1:N (1:many) and N:N (many:many) relationships. All, custom entities, as well as system entities, are supported.

Step-by-Step Video:

Step-by-Step Tutorials: 
Tutorial 1: How to add a predefined relationship
Tutorial 2: How to add a relationship from scratch
Tutorial 3: How to create a relation to a separate entity (no relation)
Addendum: Additional Filtering
How to create Totals in the footer of a table

Tutorial 1: How to add a predefined relationship
Predefined relationships are really helpful when you create a common template, like for example a quote template. Using a predefined relationship, you do not have to create it manually every time you want to create a new e.g. Quote template. 

Step 1: Create a new template
For further information on how to create a template, please read this blog article. 

Step 2: Navigate to the Additional-tab in the Template Designer
Next, open the Additional-tab. It has been designed to manage additional relationships.

Figure 1: DCP Template Designer – Additional tab​

Step 2: Add a relationship/entity
A click on the [Add Relationship/Entity]-button will open the relationship designer (see tutorial 2), while a click on the Dropdown Arrow expands a menu with predefined relationships.

Figure 2: The [Add Relationship/Entity]-button

Figure 3: Add Relationship/Entity dropdown menu – predefined relationships

The marked area includes all predefined relationships. DocumentsCorePack already has a variety of different predefined relationships for standard CRM entities, for example: All Contacts of an Account, Quote Products of a Quote, etc. They facilitate the creation of templates. Simply click on the predefined relationship in order to add it. The related fields will then be visible in the Template Designer TreeView.

Tutorial 2: How to add a relationship from scratch
When you deal with really complex relationships, it can be helpful to create a relationship from scratch. 

Step 1: Create a template and insert some fields
For further information on how to insert fields, please have a look at this blog article. As you see below, we have inserted the following fields: <> and <>

Figure 4: Insert fields

Step 2: Add a new relationship
Next, go to the additional tab and open the [Add Relationship/Entity]-drop down menu. There, select Add New Relationship…

Figure 5: Add New Relationship

In the so opened Configure Fields and Datasource-dialog, select a relationship you would like to insert ❶ and add some attributes by checking the boxes next to the attributes ❷. We decided to go with the Relationship Account -> Activity [regardingobjectid] and added the following attributes: Activity, Actual End, Actual Start, Due Date.

Figure 6: Add a new relationship

As you can see, the resolved entities are now also visible in the Additional-tab of the Template Designer and you could insert any of the fields into the document. But usually, there are more complex relationships needed. That is why you may expand the complexity of the relationship by adding more levels.

Figure 7: Resolved fields

Step 3: Add further entities

If you would like to add further relationships, please simply click on the [Edit]-button in the Additional-tab.

Figure 8: Click on the [Edit]-button

This actions opens the Configure Fields and Datasource-dialog again, providing you with the former established relationship. Please click on the [Add]-button ❶ and add another relationship ❷ here. We decided to add Activity [activityid] -> Attachment [objected] and the entities Attachment Number, Entity, File Name, Subject. ❸

Figure 9: Add another relationship

As you can see, the resolved entities are now also visible in the Additional-tab of the Template Designer and you could insert any of the fields into the document.

Figure 10: Additionally resolved fields

Please note: You may repeat these steps as often as you would like to in order to enhance the complexity of your relationships.

​Tutorial 3: How to create a relation to a separate entity (no relation)
Basically, the creation of a relation to a separate entity follows the same rules as the creation of an entity from scratch (with one exception). Therefore, in order to create a relation to a separate entity, follow the steps in Tutorial 2 carefully, but make sure that you change the following parameter when you select a new relationship:

Instead of Relationships, check Separate Entities ❶ in the Select existing Relation-section. The main difference is, that you will now be provided with separate entities ❷ instead of relationships.

Figure 11: Insert separate entities

Addendum: Additional Filtering

The most common additional steps when adding a relationship is adding additional filters to limit returned results. e.g. If you only want to see active records you would add an additional filter for that. How to create or modify additional filters is described here.

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

Was this helpful?

Yes  1 No
Related Articles
  • How to solve the issue with DocumentsCorePack fields in Arabic text
  • How to access mscrm-addons product settings in Dynamics 365
  • How to create totals in the footer of a table
  • How to set a specific Language in your Template
  • Azure Active Directory Licensing counts explained
  • When to use the „Do not use DataProvider“-setting in DocumentsCorePack
Latest Articles
  • How to display various activity-attributes within multiple rows in Gantt view
  • Recap: European Power Platform Conference 2022
  • How to solve the issue with DocumentsCorePack fields in Arabic text
  • How to access mscrm-addons product settings in Dynamics 365
  • One-Click-Actions (OCAs) in DocumentsCorePack
Popular Articles
  • DocumentsCorePack Online Service Configuration
  • Where do I find the Unique Organization name in Microsoft Dynamics 365?
  • mscrm-addons.com Application Access for Dynamics 365 (App Access) – DocumentsCorePack
  • How to activate the DocumentsCorePack connector for PowerApps & Microsoft Flow
  • How licenses are counted
Top Rated Articles
  • IMPORTANT information for Dynamics 365 online customers using DocumentsCorePack and/or AttachmentExtractor
  • How to activate the DocumentsCorePack connector for PowerApps & Microsoft Flow
  • Step-by-Step: How to configure a One-Click-Action
  • Can you save data capacity by moving email content?
  • DocumentsCorePack Property Syntax (Dynamics 365)
Categories
  • *News and General Infos* 50
  • Template Designer(DCP 160
  • DocumentsCorePack(DCP 180
  • TelephoneIntegration (TI 64
  • AttachmentExtractor (AE 55
  • PowerSearch (PS 43
  • ActivityTools (AT 57
  • SmartBar (SB 51
  • GroupCalendar (GC 45
Our Vision

“We see it as our purpose to provide products that simplify and speed up our customers’ Microsoft Dynamics 365 experience.”

Knowledgebase
LogIn
mscrm-addons.com
  • Products
  • Online Shop
  • Downloads
  • My Account
About Us
  • About Us
  • Case Studies
  • Newsletter
  • Partner Program
  • Contact
Support
  • Support
  • Terms & Conditions
  • Documentation
  • Webinars
  • Legal Documents
  • Impressum
  • © 2022 www.mscrm-addons.com. All Rights Reserved.