This guide shows you how to create a Create a One Click Action (OCA) to generate and email documents in Dynamics 365. The goal is to automate the process of generating a document, attaching it to an email, and sending it with a single click.
Step 1: Create the OCA
- Navigate to DocumentsCorePack → One Click Actions
- Select New (+)
- Configure the ❶ Type, ❷ Table and ❸ Name of the OCA.
Click Create.
Step 2: General Settings
After you create the OCA, the dialog opens the General Settings section.
Before you begin, your desired OCA is selected, and then you can begin ❶ configuring its name and ❷ description. Optionally, you can choose to ❸ hide the OCA from the DCP Dialog or ❹ define display rules. Once you finish configuring these options, proceed to the Template Settings section.
Step 3: Template Settings
Now we will configure the Template Settings.
We will need to select ❶ predefined template and choose our ❷ template. In this case, it will be a quote template.
Step 4: Processing Settings
The processing settings allow users to select the attached file, and format other conditions that will configure the OCA.
For this example, we want our document to be emailed to our client(s) as a PDF and saved to SharePoint. We will configure the following settings:
- Select PDF in Filetype
- Check the Attach Document box and select as email attachment from the drop down. Below this, you can configure the recipient.
- Select Send Emails
- Ensure the slider for Save to SharePoint is switched to the right
- Proceed to the next, and final step
Step 5: Configure Review Settings
Review Settings will appear at the final stage of document generation when performing an OCA.
For this example, we will select
- Review Document – to allow users to preview the quote document before it is sent to the email recipient
- Create PNG Preview – to create a PNG preview of the email and contents
- Edit Document – to allow users to edit the generated document if there are any adjustments they would like to make prior to sending
- Save – Click the save button in the bottom right hand corner to save your OCA
Step 6: Test the OCA
Now that you have successfully created the “Quote Email” OCA, it’s time to test the results. To do so, first head to Accounts and select the desired client you would like to email the quote to.
After selecting the account you’d like to create the quote email for, select Create Document.
Next, the OCA dialog will open, prompting you to select the desired OCA. In this case, we will use the “Quote Email” that we previously created.
Finally, the document and email will be automatically created and sent to the contact.








