This blog article outlines how to create a document and attach it to an email in a single AutoMerge workflow-step for MS CRM 2013 Online.
Figure 1: Create new workflow
In the next window type in a “Process Name” e.g. “Test_Workflow”, choose the “Entity” for which you want to create the workflow for e.g. “Account”. Set the “Category” to “Workflow” in order to create a new workflow process. Click on “OK” to confirm.
Figure 2: Create a new process
First, the email has to be created. Therefore click on the “Add Step”-drop-down-button and choose “Create Record”. Type in a name for your step e.g. “Create Email” and set the “Create:” to “Email”. Then click on “Set Properties”.
Figure 3: create a record in AutoMerge Workflows.
An email activity opens. In this window, a sender, a subject and an email text has to be defined. Set the cursor in the “Recipient”-field to define the recipient. To do so, select “Look for: Account” in the “Form Assistant”-area on the right sight, click on “Add” and then on “OK”. Now the “Recipient”-field is filled out correctly. Follow the same instructions for the “Regarding”-field, in order to set the regarding entity. E.g: “Account”.
Figure 4: window to configure an email activity.
Click on “Save and Close”.
The second step would be to create a new MSCRM-ADDONS.com AutoMerge Working item, where the document is generated and attached to the email. To do this, add a new step with click on “Add Step” and choose “Create Record”. Type in a step description and set “Create:” to “MSCRM-ADDONS.com AutoMergeWorkingItems”
Figure 5: Add a MSCRM-ADDONS.com AutoMerge Working item.step
Click on “Set Properties”. In the next window type in a name and define the AutoMerge-action. E.g. “CreateDocument”. It it important to insert the “PrimaryRecordsUrl”. For that, set the cursor in the “PrimaryRecordUrl”-field and go to the “Look for:”-area within the form assistant on the right side and select “Record URL(Dynamics) from the second drop-down-menu, click on “Add” and “OK”.
To determine the Template to be executed, set your curser in the “TemplateToExecute” field and look for it. Next to this, a file format has do be defined. E.g “pdf”. In the “TemplateToExecute”-field search for the document that should be attached. E.g. “Account_Overview_DOCX.docx”. Next set the cursor in the “EmailToAttach”-field and go to the “Look for:”-area within the form assistant on the right side and select “Create Email (Email)”. Click on “Save and Close”. (See next screenshot)
Figure 6: workflow-step configuration. E.g. Create and attach a document to an email message.
Now your workflow is finished and ready to be used. The possible result could look like this:
Figure 7: Shows email workflow with pdf-document attached. Click to enlarge.
That’s it! We appreciate your feedback! Please share your thoughts by sending an email to email@example.com.