This blog article covers a Step-by-Step example on how to set up user-prompts in DocumentsCorePack Template Designer.
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.
Figure 1: Prompts within the DCP Dialog
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 ❶ "Insert MailMerge Fields" to open the DocumentsCorePack Taskpane. Go to ❷ "Advanced Template Settings" and select ❸ "Prompts".
Figure 2: MSCRM-ADDONS.com AutoMergeWorkingItems properties
The Prompts-Editor allows you to ❶ create, ❷ edit and ❸ delete prompts. Also, the ❹ sort order of how the prompts should appear can be modified as well.
Figure 3: Prompt Editor
Step 2: Add a prompt
You can add a prompts by using the add button. Each prompt requires a name (special certain chars are not allowed).
Figure 4: Add Prompt
There are 3 different types of different prompts that you can select:
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.
Figure 5: Label
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 "Insert Field" -> "Computed Item" -> ❶ "Prompt Field". Each entry represents a prompt that you have created previously.
Figure 6: Insert prompt
A ❶ text box does not require any further septs 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.
Figure 7: Template before and after replacement of placeholders
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 client 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 email@example.com.