Step-by-Step: How to set up lookup-prompts for relations
This blog article covers a step-by-step example of how to set up user-prompts in DocumentsCorePack Template Designer.
With this special version of the prompts feature you have the possibility to select one or multiple related records while generating the document.
The following steps contain a description of how to set up such prompts in your templates.
Step1: Open the Relationship
This special version of the prompt is defined within the relationship designer.
To access it, please navigate to ❶ "Insert MailMerge Fields" to open the DocumentsCorePack Task pane. Go to ❷ "Additional" and select ❸ "Edit".
Within the “Records to show“ section, you can find three options. ❶ “Show all records“, ❷“ Show a lookup window to select a single row“ and ❸ “Show a lookup window to select multiple rows“.
Step 2: Define the lookup prompt
Before you can create the prompt you have to select the base behavior of the relation.
Show all records
By selecting this option, all related records will be displayed and there is no need for a prompt.
Show a lookup window to select a single row
In this case, you have to select one row instead of displaying all related records.
Show a lookup window to select multiple rows
Here, you have to select one or multiple rows instead of displaying all related records.
Whatever lookup option matches with your needs the next step is to define a label.
Step 3: Define a Label
To do so, please click the ❶ [Add/Update Labels]-button.
Each option requires at least one label. A label is a text that is displayed in the DocumentsCorePack Dialog in front of the actual control. 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.
After you have set up the label, you are able to use your Template.
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.
Step 5: Generate the Document
While generating the document you will be prompted to select one related record.
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.