News.mscrm-addons.com BlogHello and welcome to our blog! What can we do for you? Are you looking for further technical information or step-by-step instructions to our products? Or would you like to read the latest news on mscrm-addons? Please feel free to browse our blog for detailed information and to share our posts! https://www.mscrm-addons.com/BlogProcess generated document in a workflow from the dialoghttps://www.mscrm-addons.com/Blog/PostId/10162/process-generated-document-in-a-workflow-from-the-dialog*General*,DocumentsCorePack (DCP),DCP 365Tue, 04 Dec 2018 13:44:41 GMT<p style="text-align: justify;">This blog article outlines how to execute an additional "Attach document"-operation<span style="text-align: justify;">&nbsp;by checking the&nbsp;</span><span style="text-align: justify;"><strong>Run workflow</strong></span><span style="text-align: justify;">&nbsp;checkbox in the DocumentsCorePack Dialog (highlighted in yellow below). Therefore you have to create a workflow, which will <span style="text-align: justify;">then&nbsp;</span>be displayed in the Run workflow drop-down menu.&nbsp;</span></p> <p style="text-align: justify;">More information about how to create a workflow can be found&nbsp;<a href="https://www.mscrm-addons.com/Blog/PostId/9980/how-do-i-create-a-workflow-with-dcp-sb-online-msdyn365" target="_blank">here</a>.&nbsp;</p> <div class=" data-plugin-options=" style="text-align: justify;"> <div class="lightbox" data-plugin-options="{'delegate': 'a', 'type': 'image', 'gallery': {'enabled': false}}"> <a title="DocumentsCorePack Dialog - Run workflow" href="/Portals/0/Blog/Process_generated_document_in_a_workflow_from_the_dialog/Figure1.png"> <img alt="DocumentsCorePack Dialog - Run workflow" width="409,5" height="367,5" class="img-responsive" src="/Portals/0/Blog/Process_generated_document_in_a_workflow_from_the_dialog/Figure1.png" /> </a></div> <div class="lightbox" data-plugin-options="{'delegate': 'a', 'type': 'image', 'gallery': {'enabled': false}}"><em>Figure 1: DocumentsCorePack Dialog - Run workflow</em></div> <p class="lightbox" data-plugin-options="{'delegate': 'a', 'type': 'image', 'gallery': {'enabled': false}}"><em>&nbsp;&nbsp;</em></p> <p class="lightbox" data-plugin-options="{'delegate': 'a', 'type': 'image', 'gallery': {'enabled': false}}"><em></em>Within this tutorial, we will create such a workflow step-by-step. The result will be a document which will be&nbsp;<span style="text-align: justify; font-size: 24px; color: #0077b3;">❶</span> attached to an e-mail and also <span style="text-align: justify; font-size: 24px; color: #0077b3;">❷&nbsp;</span>attached as a note as you can see in the figure below.</p> <p class="lightbox" data-plugin-options="{'delegate': 'a', 'type': 'image', 'gallery': {'enabled': false}}"> <div class="lightbox" data-plugin-options="{'delegate': 'a', 'type': 'image', 'gallery': {'enabled': false}}" style="text-align: justify;"><a title="The result" href="https://www.mscrm-addons.com/Portals/0/Blog/Process_generated_document_in_a_workflow_from_the_dialog/Figure.png"><img alt="The result" width="674" height="414,5" class="img-responsive" src="https://www.mscrm-addons.com/Portals/0/Blog/Process_generated_document_in_a_workflow_from_the_dialog/Figure.png" /></a></div> <div class="lightbox" data-plugin-options="{'delegate': 'a', 'type': 'image', 'gallery': {'enabled': false}}" style="text-align: justify;">Figure 2: The result<br /> <br /> </div> </p> </div> <p style="text-align: justify;">Please open your Microsoft Dynamics 365 and navigate to Settings &gt; Processes. In the My Processes - area, click on the <strong>[New]</strong>-button in order to create a new workflow.&nbsp; A dialog pops up. Type in&nbsp;<span style="font-size: 24px; color: #0077b3;">❶&nbsp;</span>the name of your workflow, determine&nbsp;<span style="font-size: 24px; color: #0077b3;">❷&nbsp;</span>an entity - <strong>MSCRM-ADDONS.com AutoMergeWorkingItems</strong> in this case and select&nbsp;<span style="font-size: 24px; color: #0077b3;">❸&nbsp;</span><strong>Workflow</strong> as the process category. Afterward, hit the <strong>[OK]</strong>-button.&nbsp;</p> <div class="lightbox" data-plugin-options="{'delegate': 'a', 'type': 'image', 'gallery': {'enabled': false}}" style="text-align: justify;"><a title="Create a new workflow" href="https://www.mscrm-addons.com/Portals/0/Blog/Process_generated_document_in_a_workflow_from_the_dialog/Figure2.png"><img alt="Create a new workflow" width="412" height="309,5" class="img-responsive" src="https://www.mscrm-addons.com/Portals/0/Blog/Process_generated_document_in_a_workflow_from_the_dialog/Figure2.png" /></a></div> <div class="lightbox" data-plugin-options="{'delegate': 'a', 'type': 'image', 'gallery': {'enabled': false}}" style="text-align: justify;">Figure 3: Create a new workflow</div> <p style="text-align: justify;">&nbsp;&nbsp;</p> <p style="text-align: justify;">The window below pops up, where you can configure your workflow in detail. Please check the <span style="text-align: justify; font-size: 24px; color: #0077b3;">❶</span><strong>&nbsp;As an on-demand</strong> checkbox in the Available to Run-area and as Scope select&nbsp;<span style="text-align: justify; font-size: 24px; color: #0077b3;">❷</span> <strong>Organization</strong>. Next, please add a new step by hitting on the <strong>[Add Step]</strong>-drop-down menu and select <span style="text-align: justify; font-size: 24px; color: #0077b3;">❸&nbsp;</span><strong>Create Record</strong>.&nbsp;</p> <p style="text-align: justify;"> </p> <div class="lightbox" data-plugin-options="{'delegate': 'a', 'type': 'image', 'gallery': {'enabled': false}}" style="text-align: justify;"><a title="Create Record" href="https://www.mscrm-addons.com/Portals/0/Blog/Process_generated_document_in_a_workflow_from_the_dialog/Figure3.png"><img alt="Create Record" width="524" height="418,5" class="img-responsive" src="https://www.mscrm-addons.com/Portals/0/Blog/Process_generated_document_in_a_workflow_from_the_dialog/Figure3.png" /></a></div> <div class="lightbox" data-plugin-options="{'delegate': 'a', 'type': 'image', 'gallery': {'enabled': false}}" style="text-align: justify;">Figure 4: Create <g class="gr_ gr_50 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar only-ins replaceWithoutSep" id="50" data-gr-id="50">Record</g></div> <p style="text-align: justify;">&nbsp;</p> <p style="text-align: justify;">As soon as the step has been added to your workflow, please enter <span style="text-align: justify; font-size: 24px; color: #0077b3;">❶&nbsp;</span>a name that remains you of what it contains, e.g. Attach note. Then open the drop-down menu, select&nbsp;<span style="text-align: justify; font-size: 24px; color: #0077b3;">❷</span> MSCRM-ADDONS.com AutoMergeWorkingItems and hit the&nbsp;<span style="text-align: justify; font-size: 24px; color: #0077b3;">❸</span>&nbsp;<strong>[Set Properties]</strong>-button.&nbsp;</p> <div class="lightbox" data-plugin-options="{'delegate': 'a', 'type': 'image', 'gallery': {'enabled': false}}" style="text-align: justify;"><a title="MSCRM-ADDONS.com AutoMergeWorkingItems - Set properties" href="https://www.mscrm-addons.com/Portals/0/Blog/Process_generated_document_in_a_workflow_from_the_dialog/Figure4.png"><img alt="MSCRM-ADDONS.com AutoMergeWorkingItems - Set properties" width="306" height="280,5" class="img-responsive" src="https://www.mscrm-addons.com/Portals/0/Blog/Process_generated_document_in_a_workflow_from_the_dialog/Figure4.png" /></a></div> <div class="lightbox" data-plugin-options="{'delegate': 'a', 'type': 'image', 'gallery': {'enabled': false}}" style="text-align: justify;">Figure 5: MSCRM-ADDONS.com AutoMergeWorkingItems - Set properties</div> <p style="text-align: justify;">&nbsp;</p> <p style="text-align: justify;">The dialog below opens. It allows you to configure your workflow. Again, give it a <span style="text-align: justify; font-size: 24px; color: #0077b3;">❶&nbsp;</span>name - <strong>Attach a note</strong> in this case and select&nbsp;<span style="text-align: justify; font-size: 24px; color: #0077b3;">❷</span> <strong>AttachToEntity </strong>in the AutoMergeAction-field. Next, set the cursor in the <span style="text-align: justify; font-size: 24px; color: #0077b3;">❸&nbsp;</span>PrimaryRecordUrl-field and select&nbsp;<span style="text-align: justify; font-size: 24px; color: #0077b3;">❹</span> <strong>PrimaryRecordUrl </strong>in the drop-down menu in the Form Assistant, click on the<strong> [Add]</strong>-button and hit the <strong>[OK]</strong>-button below (highlighted in yellow). The PrimaryRecordUrl-field is filled now. Do the same for the <span style="font-size: 24px; color: #0077b3;">❺&nbsp;</span><strong>EntityToAttach (RecordURL(Dynamic))</strong>. Then, set the cursor in the <span style="font-size: 24px; color: #0077b3;">❻&nbsp;</span><strong>DocumentGUID</strong>-field, select <strong>CreatedDocument </strong>in the Form Assistant and proceed like before. To finish the workflow, please do not forget to click on the&nbsp;<span style="font-size: 24px; color: #0077b3;">❼</span> <strong>[Save and Close]</strong>-button.&nbsp;</p> <p style="text-align: justify;"> <div class="lightbox" data-plugin-options="{'delegate': 'a', 'type': 'image', 'gallery': {'enabled': false}}" style="text-align: justify;"><a title="Configure the workflow" href="https://www.mscrm-addons.com/Portals/0/Blog/Process_generated_document_in_a_workflow_from_the_dialog/Figure5.png"><img alt="Configure the workflow" width="629" height="416,5" class="img-responsive" src="https://www.mscrm-addons.com/Portals/0/Blog/Process_generated_document_in_a_workflow_from_the_dialog/Figure5.png" /></a></div> <div class="lightbox" data-plugin-options="{'delegate': 'a', 'type': 'image', 'gallery': {'enabled': false}}" style="text-align: justify;">Figure 6: Configure the workflow</div> <div>&nbsp;&nbsp;</div> </p> <p style="text-align: justify;">After finishing the configuration, do not forget to activate your so created workflow by hitting the <strong>[Activate]</strong>-button located at the top.&nbsp;</p> <p style="text-align: justify;">To see the result, please open the DocumentsCorePack Dialog by hitting the&nbsp;<strong>[Create Document]</strong>-button in your Dynamics 365. As shown in the first figure, the dialog&nbsp;<span style="text-align: justify; font-size: 24px; color: #0077b3;">❶&nbsp;</span>attaches the document as an email attachment and by checking the&nbsp;<span style="text-align: justify; font-size: 24px; color: #0077b3;">❷</span> <strong>Run workflow</strong> checkbox you can start the so created workflow and also attach it as a note.&nbsp;</p> <p style="text-align: justify;"> <div class="lightbox" data-plugin-options="{'delegate': 'a', 'type': 'image', 'gallery': {'enabled': false}}" style="text-align: justify;"><a title="The result" href="https://www.mscrm-addons.com/Portals/0/Blog/Process_generated_document_in_a_workflow_from_the_dialog/Figure6.png"><img alt="The result" width="353,5" height="318" class="img-responsive" src="https://www.mscrm-addons.com/Portals/0/Blog/Process_generated_document_in_a_workflow_from_the_dialog/Figure6.png" /></a></div> <div class="lightbox" data-plugin-options="{'delegate': 'a', 'type': 'image', 'gallery': {'enabled': false}}" style="text-align: justify;">Figure 7: The result&nbsp;</div> </p> <p class="lightbox" data-plugin-options="{'delegate': 'a', 'type': 'image', 'gallery': {'enabled': false}}" style="text-align: justify;">​</p> <p style="text-align: justify;"> <span style="font-size: 13px;"><span style="background-color: #fcfcfc; text-align: justify; color: #565656;"><strong>That&rsquo;s it!</strong>&nbsp;</span><span style="background-color: #fcfcfc; text-align: justify;">We appreciate your feedback! Please share your thoughts by sending an email to&nbsp;</span><a href="mailto:support@mscrm-addons.com" style="background-color: #fcfcfc; text-align: justify;">support@mscrm-addons.com</a><span style="background-color: #fcfcfc; text-align: justify;">.</span></span></p>10162