• Archive
  • Back to www.mscrm-addons.com
  • Archive
  • Back to www.mscrm-addons.com
home/Knowledge Base/Template Designer(DCP)

How to insert Condition Fields in DocumentsCorePack Template Designer

280 views 0

Written by Administrator
May 23, 2018

Certain properties of DocumentsCorePack templates consist of conditions based on Dynamics 365 fields. The Condition field property allows you to define dynamic content that is either displayed or removed from the final document based on a certain condition.

This step-by-step description will show you how to set conditions in DocumentsCorePack Template Designer. In this example, we want to create a quote and choose between Mr and Ms depending on the gender of the recipient.

Step 1: Create a quote template
First, we need to create the basic layout of the template. Clicking on the [Insert MailMerge Fields]-button in the www.mscrm-addons.com command bar will open the DocumentsCorePack Designer on the right side. More information about how to create DocumentsCorePack templates can be found here.

The figure below shows an example template of a quote.

Quote Template
Figure 1: Quote Template

Step 2: Use the Condition field option
After creating your template, please set the cursor at the position where you would like to insert a condition field. In our example, we want to set the condition in the subject line after “Dear” choosing between Mr and Ms based on the recipient like you can see highlighted in yellow in the figure above. Then, go to Insert Computed Item and select Condition field.

Insert condition field

Figure 2: Insert Condition field

Step 3: Configure the setup of your condition fields 

Configure condition setup

 

 

Figure 3: Configure your condition

 

❶ Give your condition a descriptive name. It makes it easy to re-use existing conditions in a template.

❷ Enable the creation of an else block and define the layout of the inserted condition fields – in this case next to each other.

❸ Use the condition designer to create your condition. In this example, we want to create the condition for the entity “Primary Contact (Contact)”. We want our condition to choose between Mr and Ms depending on the gender of the recipient. Therefore we select in the first drop-down menu the field Gender and as operator equals. Depending on the data type of the field you either have an additional control that opens a new dialog to select the compare value – in this case, Male.

A more detailed description of the condition designer can be found here.

Below you can see placeholders for the formatting options next to each other. Because you selected to insert an “ELSE” block you have the second placeholder like you can see in the figure below.

Appearance of the fields in the template
Figure 4: Appearance of the fields in the template

Step 3: Set your custom text block
Within these placeholders, you can now enter the content of your conditions. In this example, IF Gender equals to Male it should display “Mr” and ELSE “Ms”.

Custom text block

Figure 5: Custom text block

Step 4: Save your template
Before you can use or test your template you have to save it. Either you save your template locally with the standard Save or Save as the functionality of Word or you use the Save template-option of the DocumentsCorePack client in order to publish the template to Dynamics 365.

 

Step 5: Test your template
As you have made changes to your template you might want to test them quickly. A step by step description of how to test your template can be found here. Below you can see the result of your created template containing the condition we set, highlighted in yellow. 

Result of your condition field
Figure 6: Result of your condition field

​

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

​

​#reworkneeded… we have a lot of articles about conditions.. reference them or/and merge

Was this helpful?

Yes  No
Related Articles
  • General Settings – DocumentsCorePack Server Based
  • How to use the Insert-as-Picture-Link-Field-button in Dynamics-365
  • How to use the Insert-as-Picture-Link-Field-button in Dynamics-365
  • Documents generated in Flows cannot be opened
  • How licenses are counted
  • How to setup editable sections in your template (Dynamics 365)
Latest Articles
  • TemplateImportExport Console Application – DCPIE.exe
  • How to trigger a Microsoft Flow from dialog
  • General Settings – DocumentsCorePack Server Based
  • How to use the Insert-as-Picture-Link-Field-button in Dynamics-365
  • What is “documents incl. per month”
Popular Articles
  • How to activate the DocumentsCorePack connector for PowerApps & Microsoft Flow
  • How licenses are counted
  • Where do I find the Unique Organization name in Microsoft Dynamics 365?
  • How to work with the new DocumentsCorePack custom connector for PowerAutomate (Microsoft Flow)
  • DocumentsCorePack Charts Feature (Dynamics 365)
Top Rated Articles
  • How to activate the DocumentsCorePack connector for PowerApps & Microsoft Flow
  • Can you save data capacity by moving email content?
  • DocumentsCorePack Online Scheme
  • Recap of the first virtual eXtreme365 & Community Summit event
  • Step-by-Step: How to configure a One-Click-Action
Categories
  • *News and General Infos* 43
  • Template Designer(DCP 151
  • DocumentsCorePack(DCP 146
  • TelephoneIntegration (TI 62
  • AttachmentExtractor (AE 47
  • PowerSearch (PS 43
  • ActivityTools (AT 55
  • SmartBar (SB 50
  • GroupCalendar (GC 43
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
  • © 2020 www.mscrm-addons.com. All Rights Reserved.