Prompts enable the user to add or modify document elements without opening the document. The additional options for prompts are displayed in an additional window of the DocumentsCorePack dialog.
This blog article covers a Step-by-Step example on how to set up user-prompts in the DocumentsCorePack Template Designer.
Please keep in mind that the new feature “DateTime” requires the DocumentsCorePack TemplateDesigner version 10.25.
The following steps contain a description of how to set up such prompts in your templates.
Step 1: Create a Prompt
A prompt is defined in a template within the advanced template settings. To access the prompts settings navigate to
❶ the “mscrm-addons.com”-tab, then to
❷ the “Insert MailMerge Fields” to open the DocumentsCorePack taskpane.
❸ Go to “Advanced Template Settings” and select
The Prompts-Editor allows you to
❸ and delete prompts.
❹ Also, the sort order of how the prompts should appear can be modified as well.
Step 2: Add a prompt
You can add a prompt by using the [Add]-button.
❶ Each prompt requires a name.
Please note: Special certain chars are not allowed.
❷ There are 4 different types of different prompts that you can select:
a) Text (as single or multiline): A text allows the user to enter additional text in the DCP dialog that will be added to the generated document. A text prompt can be a simple single line of text or also a text box by using the allow line breaks option.
b) Checkbox: By setting the required checkbox you can define if a user has to enter data. A checkbox prompt enables you to either add or remove optional content in the document. A checkbox is by default mandatory.
c) Select: A select prompt enables you to keep only one specific section, out of several setup blocks in the document.
d) DateTime: There are 3 options, how to display the DateTime-prompt. The default setting is DateTime, where both (date and time) is displayed. You can also choose to display just date or just time.
❸ Each prompt also requires at least one label. A label is a text that is displayed in the DocumentsCorePack Dialog in front of the actual control (see Figure 1). If a label for the current user language in Dynamics 365 is set this translation will be displayed. If there is no label that matches the current user’s language, the first one in the list is displayed.
❹ Press [OK].
After you have set up the prompts in the settings, you are able to insert them into your document.
Step 3: Insert a prompt in your document
You will find an additional selection in the DocumentsCorePack taskpane:
[Insert Field] > [Computed Item] > ❶ [Prompt Field]. Each entry represents a prompt that you have created previously.
❷ It is possible to add options to the “Select” prompts like in Figure 5. There are three options created.
❶ A text box does not require any further steps as it will be replaced with the text entered by the user.
❷ For prompts of the type “Checkbox” and
❸ “Select”, you will have to replace the current placeholder text with your desired content.
❹ “DateTime” prompt: select the date and time, e. g. the current one.
Step 4: Save your template
Before you can use or test your template you have to save it. Use the “Save template”-option of the DocumentsCorePack TemplateDesigner in order to publish the template to Dynamics 365.
Please note: Prompts do not work with the Template Designer, only by using the DocumentsCorePack Server Dialog (“Create Document”).
That’s it! We appreciate your feedback! Please share your thoughts by sending an email to firstname.lastname@example.org.