mscrm-addons.com - Blog

IMPORTANT INFORMATION

This blog is deprecated since July 2020.The articles below are no longer maintained and might contain outdated information. 
You can find the most acutal and relevenat information in our Knowledge Base at support.mscrm-addons.com

News.mscrm-addons.com Blog

rss

Hello 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!


Service-based printing in AutoMerge
AutoMerge offers a service-based printing option which is additionally available to the already known plugin-based printing-option. The additional option is available within AutoMerge for MS Dynamics CRM 2011 version 5.30 and higher (click here to download the latest AutoMerge version) and is based on a service running in the background.
This article covers the following essential topics:
  • How to create a service and a printer for printing documents
  • How to add the service-based printing step to a workflow
  • Exception: How to add the service-based printing step to workflows including
    a Delete Document-step
Before you continue reading, please make sure that you have installed AutoMerge v5.30 or higher. 

Please note:
If you already run a service for printing documents, you can skip the first section of this article and can continue reading in the ‘How to add the service-based printing step to a workflow’-section. 
 
How to create and configure a service and a printer for printing documents
Before you are able to add service-based printing to a workflow, you need to configure and start a service. To do so, please follow the steps below:

1.
Start the AutoMerge ServiceManagement from within the Windows start menu.
 

Figure 1: ServiceManagement AutoMerge for MS Dynamics CRM 2011     

2. Now you can create a new service. Name the service (1) and click on the green checkmark (2).
 
Figure 2: Create a new service in the AutoMerge ServiceManagement
 
3. After that, you have to define which type of jobs the service should work on. Select only print jobs (1). You could as well set a filter for the printer to be used (2).
Setting this filter is essential e.g. 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).
 
Figure 3: Define the type of jobs which should be processed by the service, option to set filter for printer to be used
 
4. Then, switch to the CRM Connection Setup-tab and type in the CRM Server-URL (1). Please check the check-box (2). Now you can fill in your data (3). Then click on the [Retrieve all organizations]-button (4). Now please click on the [Save service configuration]-button (5). 

 
Figure 4: CRM Connection Setup
 
5. Now click on the [Start Service]-button and the service starts to run in the background.
 
Figure 5: Start Service
6. After having configured and started the service for printing, switch to the AutoMerge Printer-tab. Click on the [New]-button to add and configure a printer which should be used afterwards within the workflow.  For furthter information, please download our AutoMerge for MS CRM User Guide and read chapter 7 How to print documents with AutoMerge.

Figure 6: AutoMerge Printer-tab within the AutoMerge Service Management.
Once you have successfully added your printer, you can start to configure a workflow including the service-based printing option. In the next section, we will highlight how to appropriately add this to the Print to-step.



How to add the service-based printing step to a workflow
1. Start your CRM. Navigate to Settings > Processes. Here, you can create a new workflow.  
 
Figure 7: Processes in CRM 2011 System

 
Figure 8: Processes in CRM 2013 System

2. Start to create a new workflow and to add the CreateDocument-step. If you would like to add the service-based printing step afterwards, click on Add Step (1) and select Create Record from the drop down menu (2).
 
Figure 9: Add service-based printing step

3. Then, open the drop-down menu within the newly added step and select MSCRM-ADDONS.com AutoMergeWorkingItems.
 
Figure 10: Configure a previously added step

4. Now click on the [Set Properties]-button.
Figure 11: [Set Propterties]-button

A new window opens. Within this window, continue to appropriately configure the last added step. We type in a name for this step and set the AutoMergeAction to CreateDocument because we want to generate and print the document. Select the required template in the TemplateToExecute Lookup-field (we use the Account_Overview_DOCX.docx for our example) and as SaveAs type we define PDF. As Printer we have to define to which printer the generated document should be send.
For more information about how to create a template, click here and watch our YouTube video.
 
Please note: Before you select the printer, 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 AutoMerge for MS CRM User Guide.    
 


Figure 12: AutoMergeWorkingItems, Properties Settings

5)
In the PrimaryRecordUrl we must add the attribute Record URL(Dynamic) from the Account in the menu on the right. This means, AutoMerge will generate a PDF based on the template Account_Overview_DOCX.docx and fill it with the data from the Account defined in the PrimaryRecordUrl.

How to add PrimaryRecordUrl
First, you have to select the entity (we use Account) from the first drop-down menu of the Look for-area within the form assistant on the right side (1). Then, select RecordURL(Dynamic) from the drop-down menu (2). Then, click on the [Add]-button (3) and on the [OK]-button (4). Afterwards, the PrimaryRecordURL-field is automatically filled (5). Finally, click on the [Save and Close]-button. Now you have appropriately added the service-based printing step. 

Figure 13: Add PrimaryRecordURL
 
Exception: How to add the service-based printing step to workflows including a Delete Document-step
If you would like to add the service-based printing step to a workflow which includes a Delete Document-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 Wait-condition before the Delete Document-step in your workflow. 

1.
Click on the [Add Step]-button (1) and select Wait Condition from the drop down menu (2).
 
add wait condition 
Figure 14: Add wait condition

2. Click on Condition (click to configure) within the added wait condition (1). A new window opens. Within this new window, you have to specify the wait condition. Select Print Document (MSCRM-ADDONS.com AutoMergeWorkingItem from the first drop down menu, Status from the second, Equals from the third and Inactive from the fourth drop down menu (2). The condition now causes, that generated documents are only deleted if they have been already printed.
Finally, click on the [Save and Close]-button to complete this workflow step (3).
configure wait condition
Figure 15: Configure wait condition
 
That’s it! We appreciate your feedback! Please share your thoughts by sending an email to support@mscrm-addons.com.



Comments are closed.