Prompts enable users to add or modify document elements without opening the document. The options for prompts are displayed in an additional window of the DocumentsCorePack (DCP) dialog.
This blog article covers a step-by-step example on how to set up user-prompts in the DCP TemplateDesigner.
Please note: The new DateTime feature requires the DCP TemplateDesigner version 10.25.
The following step-by-step description explains 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 prompt settings:
❶ Navigate to the mscrm-addons.com tab.
❷ Click Insert MailMerge Fields to open the DCP task pane.
❸ Go to Advanced Template Settings.
❹ Select Prompts.
The Prompt Editor allows you to:
❶ Create prompts
❷ Edit prompts
❸ Delete prompts
❹ Edit the order of how the prompts should appear
Step 2. Add a prompt
You can add a prompt by using the Add button.
❶ Each prompt requires a name.
Please note: Certain special characters are not allowed.
❷ There are 4 different types of 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 a textbox (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 for how to display the DateTime prompt. The default setting is DateTime, where both (date and time) are displayed. You can also choose to show just the date or just the time.
❸ Each prompt requires at least one label. A label is a text displayed in the DCP Dialog before 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 DCP task pane.
Select 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.
❹ For the DateTime prompt, select the appropriate date and time.
Step 4. Save your template
Before you can use or test your template, you must save it. Use the Save Template option of the DCP TemplateDesigner to publish the template to Dynamics 365.
Please note: Prompts do not work with the TemplateDesigner, only by using the DCP Dialog (Create Document).
That´s it! We appreciate your feedback! Please share your thoughts by sending an e-mail to email@example.com.