The DateTime option allows you to perform basic calculations with dates. You can add a certain amount of time to an existing date, or you can calculate the difference between two given dates. The following step-by-step description will show you how to insert a field of this type into your template.
Requirements: The DocumentsCorePack TemplateDesigner version 9.22 and DocumentsCorePack version 2017.174.
Step-by-step description
This description outlines how to add a DateTime field into a DocumentsCorePack (DCP) template in your Dynamics 365 by using the given insert options.
This feature can only be used within DCP templates, so please open an existing template or create a new one before using this feature. (Here is an article that explains how to create a new template).
Step 1: Open the “Insert Field” dialog
Open the Insert Field button and navigate to the Computed Items section ❶. Within this section, select the DateTime Field button ❷.
Step 2: The “DateTime Field” dialog
The DateTime dialog will open. This dialog gives you the possibility to specify your DateTime Field based on the given options.
Step 3: Build your calculation
Add your DateTime calculation to the pattern field. The syntax for this field is described here. In our case, we will add 5 days to the due date of a quote.
Please note: The layout of the dialog will change depending on your used syntax.
You have the option to insert any field even if it is not a DateTime Field. Please do this at your own risk.
Step 4: Add a placeholder text [optional]
❶ You can set a placeholder name for your field so you find it easier in case you have to modify your template in the future.
Step 5: Add formatting options
Since we now have our syntax configured, we would like to define a format. This can be done by selecting one of the given options in the Unit Type, Format or Culture dropdowns.
The dialog provides us with different options for ❶ DateTime and ❷ Difference (subtraction of two dates) results.
Based on this type we will have one of the two following dialogs.
Step 6: Insert the field
Now the DateTime Field is successfully defined. Click on the OK button to insert it into the document.
Step 7: Save the template
The last and final step is to save your template. Before you can use or test your template, you have to save it. You can either save your template locally with the standard Save or Save as functionality of Word, or you use the Save template option of DCP in order to publish the template to Dynamics 365.
Step 8: Test your template [optional]
As you make changes to your template, you may 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.