The DateTime option allows you to perform basic calculations with dates. You can add a certain amount of time to a current date or calculate the difference between two dates. The following step-by-step description will show you how to insert a field of this type into your template.
This description outlines how to add a DateTime field into a DocumentsCorePack template in your Dynamics 365 by using the given insert options.
This feature can only be used within DocumentsCorePack 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 and navigate to the ❷ Computed Items section. Within this section, select the ❸ DateTime Field button.
You can start your research here if you are unfamiliar with the Insert Field button.
Step 2: The “DateTime Field” dialog will open. This dialog allows you to specify your DateTime Field based on the given options.
Step 3: 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 DocumentsCorePack 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 email@example.com.