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!


Bäck Martin
Bäck Martin
Bäck Martin's Blog

Insert Condition Fields (Dynamics 365)

The Condition field functionality property allows you to define dynamic content
that is either displayed or removed from the final document based on a certain condition.
This webinar also covers this topic in detail.
A condition block is represented by a  placeholder in the template and is also called content control (1).
The following step by step description will show you how to insert a condition field
with the DocumentsCorePack Client in your template.

The example below shows a template that contains two conditions fields (if else)
and the result with the one remaining field.

 

If you are not sure how to get to the insert fields option, please take a look at this article first.
  1. Use the Condition field option

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

     

  2. Configure the setup of your condition fields
    Enable or disable the automatic creation of an else block (1).
    If an else block is created you can define the layout of the
    inserted condition fields (2)(3).
    Figure 4: Condition field layout options
    Below you can see an example of the two formatting options when using an else block. 
    The else block is inserted next to each other (1) and below each other (2).

     

    PLEASE NOTE: A else block is always the negated version of your real condition.
    You always can identify such an element by the prefix "<!>" before the actual name.

Related Topics:
Insert a Hyperlink

 

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


Condition Designer (Dynamics 365)

The Condition Designer (1) has a similar look and feel as the standard "Advanced Find" Dialog in Dynamics365.
Also, the available options are similar. 

The Condition Designer (1) is part of the Condition Field functionality of DocumentsCorePack. Details
about this functionality can be found here.


Figure 1: The condition designer within the condition field dialog

This step by step description will show you how to the condition designer to create your condition. 

  1. Select a field from the drop-down

    Figure 2: field selector

  2. Select an operator
    Depending on the field type you will see different available operators.

    Figure 3: Operator selection

  3. Select or enter a compare value
    Depending on the data type of the field you either have an additional control
    (1) that opens a new dialog (2) to select the
    compare value. Or you can 
    enter the value directly by typing.

    Figure 4: Selection dialog for picklist elements

    Below you can see examples of other data types. 


    Figure 5: Example of a date field


    Figure 6: Example of a string fiedl

  4. Repeat steps 1 to 3 to add other lines to setup more complex condtitions
    PLEASE NOTE: All single lines are brought together to one single condition.

  5. Group your lines [optional]
    Select the required rows by using the menu that opens when you hit the arrow button.

    Figure 7: 

    The selected rows will stay highlighted (1). Select the required grouping option (2).

    Figure 8: Two highlighted rows

    After you selected the grouping a box will visually show the grouping

    Figure 9: Result ofter grouping

 PLEASE NOTE: A few fields like owner or customer (special look up fields) are not available on the actual parent level, but can be always reached by selecting the next level drop down for this element. 

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

DocumentsCorePack Condition Syntax (Dynamics 365)

Certain properties of DocumentsCorePack templates consist of conditions based on Dynamics 365 fields. This article covers the basic syntax and the advanced options that can be used.
Several DocumentsCorePack properties support the same syntax. A list of these properties can be found at the end of this article. 

  1. The basic syntax:

    Fields from Dynamics 365 are enclosed by << and >> when you insert them from the tree view.

    Figure 1: Fields

    Fixed text has to be typed manually into the text field and has to be enclosed with single quotes ( ' ).


    Figure 2: Fixed text
    To combine several Dynamics 365 fields and fixed text you have to use the plus sign (+). (see figure 3)

    Figure 3: Plus sign
  2. Supported datatypes and available operators

Datatype

Value

Bool

True, false, 0, 1

Decimal/Numbers

Format z.B.: 1.1

Currency

€ 1.1 or $1.1 (when decimal, the currency symbols €, $ are deleted)

Date

#2015-12-13# or #2015-12-13T12:00:59+01:30#

Text

 

 

Operator

Description

Used with the following datatypes

=

equals

for each

<>

does not equal

for each

>

greater than

for each

<

less than

for each

>=

greater than or equal

for each

<=

less than or equal

for each

+

addition

Decimal, Numbers, Currency, Text

-

substraction

Decimal, Numbers, Currency

*

multiplication

Decimal, Numbers, Currency

/

division

Decimal, Numbers, Currency

%

modulo

Decimal, Numbers, Currency

LIKE

LIKE comparison, wildcard *,%

text

 

Boolean Operators: AND, OR, NOT

 

 

  1. Special values and functions

     

Null / NULL

null

true

true

false

false

ISNULL

ISNULL(field, substitute value)

LEN

LEN(text) returns the string-length

IIF

IIF(condition, valuetrue, valuefalse)

TRIM

TRIM(text) deletes the whitespace at the beginning/end

SUBSTRING

SUBSTRING(text, start, len)

CONVERT

CONVERT(value, destType) destType must be a .Net datatype, e.g.: System.Int32

 

This syntax applies to the following properties and special fields:

Template Properties 

  • Remove Watermark

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


How to open the DocumentsCorePack Advanced Template Settings (Dynamics 365)

In order to apply special settings to your DocumentsCorePack Template, you have to access the Template Settings Dialog. How to get to this essential dialog is outlined step by step in this article.

The latest version of our software can be found here.

  1. Create a new or open an existing Template
    Open Word and navigate to www.mscrm-addons.com (1).
    Open an existing template with a click on the [Open Template]-button (2)
    and open the Template Designer window
    using the [Insert MailMerge Fields]-button
    (3). Or create a new template from scratch by solely hitting
    the [Insert MailMerge Fields]-button. (3)

    Figure 1: DocumentsCorePack Add-In
  2. Open the Advanced Template settings
    Hit the [Advanced Template Settings]-button
    (4, see figure 1)
    in the Template Designer.
    Navigate to the property you would like to modify
    by clicking on the item (5, see figure 2)
  3. Figure 2: Template Settings
A complete list of all the available properties can be found here.
That’s it! We appreciate your feedback! Please share your thoughts by sending an email to support@mscrm-addons.com.

DocumentsCorePack Property Syntax (Dynamics 365)

Certain properties of DocumentsCorePack templates consist of fixed text and Dynamics 365 fields. There are also some additional function calls available and data
from Dynamics 365 can also be manipulated.
Several DocumentsCorePack properties support the same syntax. A list of these
properties can be found at the end of this article. This article covers the basic syntax and the advanced options that can be used

  1. The basic syntax:
    Fields from Dynamics 365 are enclosed by << and >> when you insert them from the tree view.

    Figure 1: Fields

    Fixed text must be typed manually into the text field and must be enclosed by single quotes (' ).


    Figure 2: String
    To combine several Dynamics 365 fields and fixed text you have to use the plus sign (+). 

    Figure 3: Plus
  2. The advanced syntax:
    Function calls can be applied to Dynamics 365 fields by using . (dot) and the actual function call.
    There are also standalone method calls supported. The function call must end with brackets.
    Certain functions may also support parameters or have mandatory parameters. 
    Figure 4: Function pos with parameters 2 and 5


    Figure 5: Standalone function DATETIME without parameters

The following table contains a list of all available functions that can be applied to Dynamics 365 fields.
For all examples bellow please assume the <> field will be MSCRM-addons.com after the merge.

Function

Description

Example

<>.pos(x,y)

will insert y signs from the xth
position.

<>.pos(2,5)
Result: "CRM-a"

<>.left(x)

will insert the first x – signs.
E.g.: <>.left(5)

<>.left(5)
Result: "MSCRM"

<>.right(x)

will insert the last x signs of the string. E.g.: <>.right(3)

<>.right(3)
Result: "com"

<>.upper()

displays all values in the field in capital letters.

Result: "MSCRM-ADDONS.COM"

<>.lower()

displays all values in the field in small letters.

Result: "mscrm-addons.com"

<>.caps()

displays the first letter in the field before as capital letter.

Result: "Mscrm-addons.com"

<>.firstcaps()

displays the first letter in a
sentence in capital letter

Mscrm-addons.com

<>.invert()

reverses every case

Result: "mscrm-ADDONS.COM"

The following table contains a list with all available functions that can be applied to Dynamics 365 fields

Function

Description

Example

guid()

generates a unique serial
number

b8a4d649-342e-4bfc-9a6f-b4afd4741b4

DATETIME()

inserts the actual and local date
and time

06.12.2013 16:06

DATETIME(dd.MMMM.yy, de-DE)

there are many different
formatting options for displaying
the culture name for different
countries For more information
please click here.

06.Dezember.13

DATETIME(DD.MMMM.YY ' '
mm:ss, de-DE)

For more information about the
different cultures which can be
displayed, please click here.

06.Dezember.13 16:06


This syntax applies to the following properties and special fields:

Template Properties 

  • Document Name and Subject
  • Sub Folder
  • Sharepoint Metadata

Special Document Fields

  • Calculated Fields
  • Advanced String
  • Hyperlink field
  • QR Code

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


Template Settings (Dynamics 365)

Template settings are additional capabilities that can be defined in your DocumentsCorePack templates.
The purpose of most of the settings is to improve the automation of the document generation process.
The template settings window consists of a menu area (1) and the actual settings area (2).

Figure 1: Template Settings

Below you can find a complete list of all available template settings with a short description. Some elements have a more detailed description attached as a link.

 

  • Document Name and Subject
    The document name allows you to specify a final filename for the generated document. Also, the subject can be set for further DocumentsCorePack Client based operations.
    Document Name and Subject
     
  • General
    A list of general settings. In this section, you also can mark your template as a so called Label Template with special behavior.
  • Create Activities For
    This section is used to predefine settings for DocumentsCorePack Client based operations. It affects the Regarding and Recipient fields for Dynamics 365 activities created with the DocumentsCorePack Client.
  • Document Protection
    You can provide a password to your generated Word document. Also for the DocumentsCorePack Server based document generation, you can set a password for your PDF and enhance the security of your PDF.
  • Sub Folder
    Let your template automatically create a subfolder in the default location of your documents to structure your documents.
  • Client Automation
    Set certain options to improve the speed of work by setting default options for certain DocumentsCorePack Client based operations.
  • Email(Create Activity)
    These settings are only intended for the DocumentsCorePack Client based operations. It only takes affect when the [Create Activity]-button of the Client is used and does not work with the Send as …-option.
  • Additional Fields
    This area contains fields that are not directly inserted into the template. You do not have to worry about the settings because all out of the box functionalities populate the necessary fields automatically.

    Sharepoint Metadata
  • If you are using the standard Dynamics 365 SharePoint integration you can define metadata fields and values in your template. As soon as the generated document is saved, also the metadata is populated to Dynamics 365.
    Sharepoint Metadata
Related Topics:
Insert Fields

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

Document Subject (Dynamics 365)

The Document subject property allows you to define a subject or a subject pattern for your template. If you only set a document name, the document name will be set as subject as well. So when you use the [Create Activity]-button form the Client, the subject will be already prefilled in the creation dialog.
Please note: This setting only affects the DocumentsCorePack Client Based process!

Example: A template named Quote_Base.docx (1) populates the subject field of the Create Activity dialog Nuclear Power Plant-QUO-01000-W4G3T9.docx (2).

 

  1. Access the Document Name and Subject section
    Navigate to Document Name and Subject (1).  
    Figure 2: Example of a set property
     
  2. Enable the set subject option and switch to the subject tab
    Check the Set document name and subject separate-checkbox (1).
    Switch to the subject tab (2)
    Figure 3: Subject section

  1. Set your subject pattern
    Insert placeholder for Dynamics 365 fields by double-clicking the element in the treeview
    or type in some fixed text enclosed by single quotes

    The basic rules for the syntax of this property are:
    Dynamics 365 fields must be enclosed by << and >>
    -
    Fixed text must be enclosed by single quotes (').
    - Fields and fixed text must be combined with a plus (+)

    Details about the syntax for this property can be found here:
    DocumentsCorePack Property Syntax
  2. 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
    functionality of Word, or you use the Save template-option of the
    DocumentsCorePack client in order to publish the template to Dynamics 365.
  3. Test your template [optional]
    As you have made changes to your template you might want to test it quickly. A step by step description of how to test your template can be found here.

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


How to test a DocumentsCorePack template (Dynamics 365)

You have created or modified a new template and now you would like to give
it a try. You can test your template with DocumentsCorePack Client.

Make sure that you have opened your template in Word. If the template
has not been opened in Word or if the template is not a DocumentsCorePack
template, the following steps will most likely not work.

  1. Hit the [Choose Data]-button
    A search dialog in which you can select a test record will open up.
    Figure 1: The [Choose Data]-button
     
  2. Select a record
    Enter a search term and click on the [ Search ]-button (1).
    Select one of the records from the result windows (2)
    and hit the [Select]-button (3).

    Your template will be merged and the Dynamics 365 data will be populated.
    Figure 2: Look for Dynamics 365 data
  3. Check your created document
    Now check your template and verify if your modifications and your
    design are as expected.

    Please note: Some special settings may not take effect at this point!
    To ensure that everything works properly, please use your template in the usual working process. 

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

Document Name (Dynamics 365)
The Document name property allows you to define a name or a name pattern
for your template. So the actual document already has a pretty name as soon
as it is generated. This setting applies to both, DocumentsCorePack Server Based and
DocumentsCorePack Client Based. The following step by step description outlines
how to set this property in the DocumentsCorePack Client for your template.

Example: A template with the name "Quote_Base.docx" (1) creates a document with
the name "Nuclear Power Plant-QUO-01000-W4G3T9.docx" (2).

Figure 1: Example

If you are not sure how to get to access to the template settings to set the
document subject please have a look at this article first.


  1. Access the Document Name and Subject section
    Navigate to Document Name and Subject (1).

    Figure 2: Document Name and Subject

  2. Set your document name pattern
    Insert placeholder for Dynamics 365 fields by double-clicking the element in the tree
    or type in some fixed text enclosed by single quotes.

    The basic rules for the syntax of this property are:
    - Dynamics 365 fields have to be enclosed by << and >>
    -
    The fixed text has to be enclosed by single quotes (').
    - Fields and fixed text have to be combined with a plus (+)

    Details about the syntax for this property can be found here:
    DocumentsCorePack Property Syntax
    Figure 3: Example of a set property

  3. 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
    a functionality of Word or you use the Save template-option of the
    DocumentsCorePack client in order to publish the template to Dynamics 365.

  4. Test your template [optional]
    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.

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

The [Insert Field]-button (Dynamics 365)

This article outlines the functionalities of the [Insert field]-button. 

The button itself inserts a selected field directly into your document.
The Drop-down-menu (1) allows you to insert special field types to your template.

Figure 1: The Insert Field button 

The link list below directs you to articles that describe the different functionalities.

 

  1. - Insert Condition Fields

    Figure 4: Computed items

  2. Insert DocuSign items
    Follow this link to get further information about our DocuSign integration
    and how to use it:
    Figure 5: DocuSign items

Related Topics:
List of available template settings

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