One-Click Actions (OCA’s) are predefined settings for the DocumentsCorePack-Dialog to simplify and streamline document generation and delivery within Dynamics 365 and PowerApps.
Example: Accounting needs to generate PDF invoices, send them by email to the customer, save a copy to SharePoint and also get a printed copy.
By defining an OCA we users can perform this process with a single -click.
Documentation: One-Click-Actions User Guide.
Step-by-Step Video: How to configure a One-Click-Action
In this guide, we will show you how to create a new one-click-action to send pdf by e-mail to a customer and save it to SharePoint.
To get started, open your Dynamics 365 Settings, navigate to the “MSCRM-ADDONS”-section, and select DocumentsCorePack.
The main configuration window provides you with a few tabs that allow configuring DCP in general.
- This is the “One-Click-Actions”-tab, the new feature of DCP ServerBased.
- It shows all available entities.
- Thesearch function helps you find the entity for which you want to create a One-Click-Action.
In this case, we search for the entity “Account” and hit the [Edit]-button on the right side, which opens the “Account” One-Click-Actions.
In this window hit the [New Single].
A new dialog opens up, where you have to enter the name of your One-Click-Actions, “Test OCA” in this example. Press the [OK]-button.
After hitting the [OK]-button, you will be provided with the configuration window for “Single Record Actions“. Please follow the next steps to configure your One-Click-Action in detail:
Step 1: General Settings
- You have named your One-Click-Action earlier and now you have the possibility to edit the name you have entered.
- You can add a description.
- It is also possible to set this action as default by checking the corresponding box.
- With these buttons you can switch forward to the next step or go back to the last one. When you are happy with your configuration, then switch forward.
- You can delete your just created One-Click-Action.
- Select the security roles that a user has to have to see the One-Click-Action. If nothing is selected, everyone can see the One-Click-Action.
Step 2: Template Settings
These settings help you to configure your template selection in detail. In our example.
1. There is a drop-down in the Template Selection, where you can decide between
2. Activate this setting to edit the template before the document would be created.
3. This setting allows you to show specific template groups based on the current record attributes.
Let´s start with
a) “Allow User Selection”
If selected “Allow User Selection“, there is no need for further settings in step 2. To check that, you can select your “Account Entity” in your Dynamics 365 and press the [Create Document]-button.
The DocumentsCorePack Dialog opens so you can select your template. Press the [Next]-button.
Figure 9: Step 2 – Allow user selection – DCP-Dialog Templates
b) „Predefine Template“
- The next in the drop-down list is “Predefine Template”.
- Here you can predefine a template.
Please Note: This means the user does not have a DocumentsCorePack template selection, the template is used automatically. For more information on how to create a template, please have a look at this blog article.
Now look for a template for your entity “Account” and add it.
Please Note: Click on the [Add]-button to add a template or note, otherwise the template will open.
In this case, it is the “Account_Overview.docx”.
- You can see your chosen document.
- Switch to the next step.
c) “Use MultiPart”:
1. The next in the drop-down list is “Use MultiPart”.
2. This is the section of the selected documents you want to concatenate.
a. With [+]-button you can add another template,
b. Delete it, or
c. Combine the selected DocParts. Therefore, you have to select more than one document to combine it.
3. Define the options for concatenation of this document. Learn more about the Concatenate Syntax.
4. Based on conditions from your entity you can define if a DocPart should be used or not.
5. Define if this DocPart is optional or not on the DCP-Dialog
6. Define if this DocPart is visible or not on the DCP-Dialog.
7. Switch to next step.
If you press the [Concatenate]-button (3), a wonderful overview opens where you can define your concatenating options over the drop-down-list and confirm it.
Step 3: Processing Settings
At this step, you can define the actions which should be done. In this example, the action is defind as
- send the Account_Overview as .pdf
- Attached as document.
- Save it to SharePoint;
- You can set your General Behavior. There are 3 possibilities:
- Set configured settings as default
- Hide configured settings
- Disable configure settings
- Here you can inherit the main behavior or
- Do not save
- Set as default
- Hide this setting
- Show, but do not allow changes
- Switch to next step
Figure 15: Step 3 – Configure your OCA
Step 4: Review Settings
You have the possibility to review your document, create a “PNG preview” and automatically open your document like you can see in the figure below.
After configuring all steps, you have to save your actual One-Click-Action (highlighted in yellow).
Test your OCA
If a Dynamics 365 user now clicks on the [Create Document]-button , the user will be automatically provided with the new one-click-action (here: Test OCA).
Figure 18: Creating a document with OCA
Click on your Created One-Click-Action document and depending on your selection (2a, 2b, 2c) this window will open. Check the options you have and press the [Next]-button.
Figure 19: Create a document
Your created documents are shown. Click next.
Figure 20: Created documents
Here is a preview of your generated document. You can edit or you can finish the One-Click-Action.
Look back in Dynamics 365 for your generated template:
Figure 22: Generated Template
That’s it! We appreciate your feedback! Please share your thoughts by sending an e-Mail to firstname.lastname@example.org.