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/BlogAutoMerge: service-based printinghttps://www.mscrm-addons.com/Blog/PostId/9639/automerge-service-based-printingAutoMerge (AM),AM 2011Thu, 04 Apr 2013 14:32:00 GMT<div><strong>AutoMerge now offers a service-based printing option</strong> which is available additionally to the already known plugin-based printing-option. The additional option is available within AutoMerge for MS Dynamics CRM 2011 v5.30 and higher (click <a href="http://www.mscrm-addons.com/Downloads/DownloadAutoMergeforCRM2011/tabid/176/Default.aspx">here</a> to download the latest AutoMerge version) and is based on a service which is running in the background.</div> <div>This article covers the following essential topics:</div> <ul> <li><a href="http://mscrm-addons.com/admin/Posts/Add_entry.aspx?id=8892f256-1ff0-44e1-8ca0-8132f2206e77#create service">Creation of a service and a printer for printing documents</a> </li> <li><a href="http://mscrm-addons.com/admin/Posts/Add_entry.aspx?id=8892f256-1ff0-44e1-8ca0-8132f2206e77#add service step">Adding the service-based printing step to a workflow</a> </li> <li><a href="http://mscrm-addons.com/admin/Posts/Add_entry.aspx?id=8892f256-1ff0-44e1-8ca0-8132f2206e77#exception2">Exception: Adding the service-based printing step to workflows including <br /> a &lsquo;Delete Document&rsquo;-step</a> </li> </ul> <div>Before you continue reading, please make sure that you installed AutoMerge v5.30 or higher. After that, please proceed as described in the sections below. </div> <div><strong> <br /> NOTE:</strong> If you already run a service for printing documents (as this is quite usual when using AutoMerge with CRM Online), you can skip the first section of this article and can continue reading in the <a href="http://mscrm-addons.com/admin/Posts/Add_entry.aspx?id=8892f256-1ff0-44e1-8ca0-8132f2206e77#add service step">&lsquo;How to add the service-based printing step to a workflow&rsquo;</a>-section further down.</div> <div><a name="create service"><strong>How to create and configure a service and a printer for printing documents using AutoMerge for MS Dynamics CRM 2011</strong></a></div> <div>Before you are able to add the service-based printing to a workflow, you need to configure and start a service. To do so, please follow the steps below:</div> <div><strong> <br /> 1.</strong> Start the AutoMerge ServiceManagement from within the Windows start menu. (see screenshot below)</div> <div>&nbsp;</div> <div><a href="http://mscrm-addons.com/images/blog/files/start%20AM%20service%20management.png"><img title="start AM service management" alt="start AM service management" src="http://mscrm-addons.com/images/blog/files/start%20AM%20service%20management_thumb.png" width="383" height="514" style="border-width: 0px; border-style: solid;" /></a> <br /> <em>Screenshot: ServiceManagement &ndash; AutoMerge for MS Dynamics CRM 2011 <br /> <br /> </em></div> <div><strong>2.</strong> Here you can create a new service. Type in a name of the service (see screenshot, ellipse 1) and click on the green tick (see screenshot, ellipse 2).</div> <div><a href="http://mscrm-addons.com/images/blog/files/AMService.png"><img title="AMService" alt="AMService" src="http://mscrm-addons.com/images/blog/files/AMService_thumb.png" width="522" height="332" style="border-width: 0px; border-style: solid;" /></a>&nbsp;<br /> <em>Screenshot: create a new service in the AutoMerge ServiceManagement </em></div> <div><em>&nbsp;</em></div> <div><strong>3.</strong> After that, you have to define which type of jobs the service should work on. Select &lsquo;only print jobs&rsquo; (see screenshot below, ellipse 1). Furthermore, you have the possibility to set a filter for the printer to be used (see screenshot below, ellipse 2). Setting this filter is essential e.g. in the following case: If you have offices in Austria and the US, you can type in the name of the printer located at your site (e.g. at your Austrian office) in order to avoid that your documents are printed by the printer located at the other site (e.g. at your American office).</div> <div><a href="http://mscrm-addons.com/images/blog/files/AMConfig.png"><img title="AMConfig" alt="AMConfig" src="http://mscrm-addons.com/images/blog/files/AMConfig_thumb.png" width="518" height="330" style="border-width: 0px; border-style: solid;" /></a>&nbsp;<br /> <em>Screenshot: define the type of jobs which should be processed by the service, option to set filter for printer to be used</em></div> <div><strong> <div>4.</div> </strong> <div>Then, switch to the &lsquo;CRM Connection Setup&rsquo;-tab and type in the CRM Server-URL (see screenshot below, ellipse 1). After that, please tick off the appropriate box. (ellipse 2). Now you can fill in your data (ellipses 3). Then click on the &ldquo;Retrieve all organizations&rdquo; button (ellipse 4). After that you, have to &ldquo;Save the service configuration&rdquo; (ellipse 5). <strong><br /> <br /> <a href="http://mscrm-addons.com/images/blog/files/Unbenannt_5.png"><img title="Unbenannt" alt="Unbenannt" src="http://mscrm-addons.com/images/blog/files/Unbenannt_thumb_5.png" width="522" height="332" style="border-width: 0px; border-style: solid;" /></a>&nbsp;<br /> </strong><em>Screenshot: CRM Connection Setup&nbsp;</em><em> </em><strong><em><br /> </em></strong></div> </div> <div><strong>5.</strong> Afterwards, click on &lsquo;Start Service&rsquo; and the service starts to run in the background (see screenshot below)</div> <div><a href="http://mscrm-addons.com/images/blog/files/Unbenannt_6.png"><img title="Unbenannt" alt="Unbenannt" src="http://mscrm-addons.com/images/blog/files/Unbenannt_thumb_6.png" width="524" height="331" style="border-width: 0px; border-style: solid;" /></a>&nbsp;<br /> <em>Screenshot: start service </em><em> <br /> </em></div> <div><strong>6.</strong> After having configured and started the service for printing, switch to the AutoMerge [Printer]-tab. Click on [New] to add and configure a printer which should be used afterwards within the Workflow. Available for v5.38 and higher. See next screenshot, highlighted in yellow. For more information please download our <a href="http://www.mscrm-addons.com/Support/Documentation/tabid/116/language/de-DE/Default.aspx#AM">AutoMerge for MS CRM User Guide</a>and read chapter 7 &ldquo;How to print documents with AutoMerge&rdquo;.</div> <div><a href="http://mscrm-addons.com/images/blog/files/image_292.png"><img title="image" alt="image" src="http://mscrm-addons.com/images/blog/files/image_thumb_265.png" width="509" height="426" style="border-width: 0px; border-style: solid;" /></a> <br /> <em>Screenshot: AutoMerge [Printer]-tab within the AutoMerge Service Management.</em></div> <div>Once you successfully added your printer, you can start to configure a workflow including the service-based printing option. In the example below, we will highlight how to appropriately add this &lsquo;Print to&rsquo;-step.</div> <div><strong><a name="add service step">How to add the service-based printing step to a workflow </a></strong></div> <div><strong> </strong> <div><strong>&nbsp;</strong></div> <div><strong>1. </strong>Start your CRM. Go to the &lsquo;Processes&rsquo; within the &lsquo;Settings&rsquo;-area . Here, you have the possibility to create a new workflow.&nbsp;&nbsp;&nbsp;&nbsp;</div> <strong> </strong></div> <div><a href="http://mscrm-addons.com/images/blog/files/crm%20processes.png"><img title="crm processes" alt="crm processes" src="http://mscrm-addons.com/images/blog/files/crm%20processes_thumb.png" width="205" height="402" style="border-width: 0px; border-style: solid;" /></a> <br /> <em>Screenshot: Processes in CRM 2011 System <br /> <br /> <a href="http://mscrm-addons.com/images/blog/files/image_293.png"><img title="image" alt="image" src="http://mscrm-addons.com/images/blog/files/image_thumb_266.png" width="515" height="73" style="border-width: 0px; border-style: solid;" /></a> <br /> </em></div> <div><a href="http://mscrm-addons.com/images/blog/files/image_294.png"><img title="image" alt="image" src="http://mscrm-addons.com/images/blog/files/image_thumb_267.png" width="516" height="80" style="border-width: 0px; border-style: solid;" /></a>&nbsp;<br /> <em>Screenshots above: Processes in CRM 2013 System </em><em> <br /> </em></div> <div><strong>2.</strong> Start to create a new workflow and to add the &lsquo;CreateDocument&rsquo;-step. If you would like to add the service-based printing step afterwards, click on &lsquo;Add Step&rsquo; (see screenshot, ellipse 1) and chose &lsquo;Create Record&rsquo; from the drop down menu (see screenshot below, ellipse 2).</div> <div><a href="http://mscrm-addons.com/images/blog/files/add%20printing%20step.png"><img title="add printing step" alt="add printing step" src="http://mscrm-addons.com/images/blog/files/add%20printing%20step_thumb.png" width="525" height="297" style="border-width: 0px; border-style: solid;" /></a>&nbsp;<br /> <em>Screenshot: start to add service-based printing step, click to enlarge </em><em> <br /> </em></div> <div><strong>3.</strong> Then, open the drop-down menu within the newly added step and chose &lsquo;MSCRM-ADDONS.com AutoMergeWorkingItems&rsquo; (see screenshot below).</div> <div><a href="http://mscrm-addons.com/images/blog/files/select%20AM%20working%20item.png"><img title="select AM working item" alt="select AM working item" src="http://mscrm-addons.com/images/blog/files/select%20AM%20working%20item_thumb.png" width="526" height="298" style="border-width: 0px; border-style: solid;" /></a>&nbsp;<br /> <em>Screenshot: start to configure newly added step, click to enlarge </em><em> <br /> </em></div> <div><strong>4.</strong> Afterwards, click on &ldquo;Set Properties&rdquo;. See next screenshot, highlighted in yellow:</div> <div><a href="http://mscrm-addons.com/images/blog/files/image_297.png"><img title="image" alt="image" src="http://mscrm-addons.com/images/blog/files/image_thumb_270.png" width="272" height="69" style="border-width: 0px; border-style: solid;" /></a>&nbsp;</div> <div>A new window opens (see next screenshot). Within this window, you can continue to appropriately configure the newly added step. We type in a name for this step and set the &ldquo;AutoMergeAction&rdquo; to &ldquo;CreateDocument&rdquo; because we want to generate and print the document. If you have an existing document in CRM which you want to print you have to select it from the &ldquo;TemplateToExecute&rdquo; lookup field (in our case its &ldquo;Account_Overview_DOCX.docx) and as &ldquo;SaveAs&rdquo; type we define &ldquo;PDF&rdquo;. As &ldquo;Printer&rdquo; we have to define to which printer the generated document should be send.</div> <div> <div><strong>IMPORTANT:</strong> Before chosing the printer within this step, you have to ensure that the printer has been installed and added appropriately. Furthermore, it is crucial to use the same name as used during the printer-installation process. For more details, please download our <a href="http://www.mscrm-addons.com/Support/Documentation/tabid/116/language/de-DE/Default.aspx#AM">AutoMerge for MS CRM User Guide</a>and read chapter 7.1 "How to install and add a printer before using it with AutoMerge&rdquo;.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div> </div> <div><strong><br /> <a href="http://mscrm-addons.com/images/blog/files/image_296.png"><img title="image" alt="image" src="http://mscrm-addons.com/images/blog/files/image_thumb_269.png" width="525" height="396" style="border-width: 0px; border-style: solid;" /></a></strong><a href="http://mscrm-addons.com/images/blog/files/image_296.png"></a><br /> <em>Screenshot: AutoMergeWorkingItems, Properties Settings</em><strong> <br /> <br /> <strong>5)</strong></strong> In the PrimaryRecordUrl we have to add the attribute &ldquo;Record URL(Dynamic)&rdquo; from the Account in the menu on the right. That means AutoMerge will generate a PDF based on the template &ldquo;Account_Overview_DOCX.docx&rdquo; and fill it with the data from the Account defined in the &ldquo;PrimaryRecordUrl&rdquo;. <br /> <br /> How to add &ldquo;PrimaryRecordUrl&rdquo;: First you have to select &lsquo;Account&rsquo; from the first drop-down menu of the &lsquo;Look for&rsquo;-area within the form assistant on the right (see screenshot, ellipse 1). Afterwards, select &lsquo;RecordURL(Dynamic)&rsquo; from the drop-down menu below (see screenshot, ellipse 2). Then, click on &lsquo;Add&rsquo; (see screenshot, ellipse 3) and on &lsquo;OK&rsquo; (see screenshot, ellipse 4). Afterwards, the &lsquo;PrimaryRecordURL&rsquo;-field is automatically filled (see screenshot, ellipse 5). Click on &lsquo;Save and Close&rsquo;. Now you have appropriately added the service-based printing step. Click on "Save and Close".</div> <div><a href="http://mscrm-addons.com/images/blog/files/image_298.png"><img title="image" alt="image" src="http://mscrm-addons.com/images/blog/files/image_thumb_271.png" width="525" height="482" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px; border-style: solid;" /></a><em> <br /> Screenshot: add PrimaryRecordURL, click to enlarge <br /> </em></div> <div><strong>&nbsp;</strong> <div>&nbsp;</div> <div><a name="exception2">Exception: Adding the service-based printing step to workflows including a &lsquo;Delete Document&rsquo;-step</a></div> </div> <div>If you would like to add the service-based printing step to a workflow which includes a &lsquo;Delete Document&rsquo;-step it is important to know that the service is only checking every 90 seconds if there are generated documents to be printed. In the worst case, documents are generated and deleted within this 90 seconds and the service is not able to print the documents, because they have been already deleted. To avoid this, it is important to include a &lsquo;Wait&rsquo;-condition before the &lsquo;Delete Document&rsquo;-step in your workflow. To do so, follow the steps below:</div> <div><strong> <br /> 1.</strong> Click on &lsquo;Add Step&rsquo; (see screenshot, ellipse 1) and chose &lsquo;Wait Condition&rsquo; from the drop down menu (see screenshot, ellipse 2).</div> <div>&nbsp;</div> <div><a href="http://mscrm-addons.com/images/blog/files/add%20wait%20condition.png"><img title="add wait condition" alt="add wait condition" src="http://mscrm-addons.com/images/blog/files/add%20wait%20condition_thumb.png" width="521" height="295" style="border-width: 0px; border-style: solid;" /></a>&nbsp;<br /> <em>Screenshot: add wait condition, click to enlarge </em><em> <br /> </em></div> <div><strong>2.</strong> Click on &lsquo;condition (click to configure)&rsquo; within the newly added wait condition (see screenshot, ellipse 1). A new window opens. Within this new window, you have to specify the wait condition. Chose &lsquo;Print Document (MSCRM-ADDONS.com AutoMergeWorkingItem&rsquo; from the first drop down menu, &lsquo;Status&rsquo; from the second, &lsquo;Equals&rsquo; from the third and &lsquo;Inactive&rsquo; from the fourth drop down menu (see screenshot, ellipse 2). The condition now causes that generated documents are only deleted if they have been already printed. Afterwards click on &lsquo;Save and Close&rsquo; to complete this workflow step (see screenshot, ellipse 3).</div> <div><a href="http://mscrm-addons.com/images/blog/files/configure%20wait%20condition.png"><img title="configure wait condition" alt="configure wait condition" src="http://mscrm-addons.com/images/blog/files/configure%20wait%20condition_thumb.png" width="523" height="296" style="border-width: 0px; border-style: solid;" /></a> <br /> <em>Screenshot: configure wait condition, click to enlarge <br /> </em></div> <div>Please do not hesitate to contact <a href="mailto:support@mscrm-addons.com">support@mscrm-addons.com</a> should you require further information.</div>9639