This step-by-step description outlines how to create and custom a one-click-actions using MultiPart. In this example, we want to create a proposal that consists of severalDocParts: a cover letter, a company profile, the proposal, terms, conditions (in different languages), and the appendix.
Usually, you create a document from a single template. By using the MultiPart-function, you have the possibility to create a document from several elements, which can be dynamic (template) or static (document stored as a note or on SharePoint). For more information, please also have a look at the corresponding documentation here.
To start the configuration, please open your Dynamics 365 Settings, navigate to the MSCRM-ADDONS-section, and select DocumentsCorePack(DCP), as you can see in the figure below.
Figure 1: Dynamics 365 Settings – MSCRM-ADDONS – DocumentsCorePack
Please Note: The main configuration window provides you with a few tabs that allow you to configure your Dynamics 365 DocumentsCorePack in general.
❶ Press the “One-Click-Actions“-tab, a feature of the DocumentsCorePack ServerBased.
❷ All available entities are listed in the window that opens.
❸ The search-function helps you to find an entity that you want to create like in this case “Quote”
❹ The [Edit]-button opens the “One-Click-Actions“.
Figure 2: One-Click-Actions – available entities
After pressing the [Edit]-button, the window “AI Builder Dataset File One-Click-Actions” opens.
Figure 3: AI Builder Dataset File One-Click-Actions
❶ Hit the [New Single]-button and this dialog opens:
Figure 4: Dialog for naming your One-Click-Actions
❷ Enter the name of your action like in this example “Proposal” and hit the [OK]-button. You will be provided with the configuration window for Single Record Actions. Please follow the next steps to configure your action in detail.
Step 1: General Settings
❶ You have the possibility to change the Name
❷ and you can add a Description
❸ or set this action as default configuration
❹ and switch to the next step.
Step 2: Template Settings
After you switched to the next step, the Template Settings are displayed. Now you can configure your MultiPart-document.
❶ Select the “Use MultiPart“-option in the drop-down list
❷ Add your DocParts by pressing the [+]-button.
Figure 5: Template Settings Overview
Define your DocParts next:
❷ Cover letter
Please select Template as Type, which opens the “Look-Up Record”-window, where you can choose your template – like in this case, “Quote_Cover.docx“. It is very helpful to enter a description for your DocPart to identify it easily in the DCP Dialog. We want this DocPart to be shown, so please select the corresponding Checkbox “Show“.
❸ Company profile
Next click on the [+]-button to add the next DocPart you want to define. This DocPart has to be defined as the cover letter. The only difference is that the company profile in our example is optional.
❹ Proposal
This DocPart contains two templates:
- the “Proposal long version” and
- the “Proposal short version”
Therefore please create two DocParts as explained before, select them by checking the checkbox on the left side, and combine them by hitting the [Combine selected DocParts]-button (highlighted in yellow).
❺ Terms and Conditions
Like the proposal before, you have to define the several templates and combine them. This DocPart is optional like you can see on the right side.
❻ Appendix
Define the appendix like the other DocParts before and set it to optional.
Step 3: Processing Settings
At this step, you can define the actions which should be done like in this example send the document
❶ as a pdf
❷ as an e-mail attachment
❸ to a potential customer and
❹ save it to SharePoint
Step 4: Review Settings
You have the possibility to review your document, create a PNG preview, and automatically open your document as you can see in the figure below.
After configuring all steps, you have to save your actual one-click-action.
If now a Dynamics 365 user clicks on the [Create Document]-button, he will be automatically provided with the new One-Click-Actions like here: “Proposal”.
Hit the [Next]-button to see the result of your proposal which contains the elements you defined before. As configured above, some DocParts are optional, where the user can decide if he wants to add these to his document by checking the checkbox. The “combined DocParts” like you can see below Terms and Conditions, allow users to select between the different DocParts by opening the drop-down menu.