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!


AutoMerge: service-based printing
AutoMerge now offers a service-based printing option 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 here to download the latest AutoMerge version) and is based on a service which is running in the background.
This article covers the following essential topics:
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.

NOTE:
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 ‘How to add the service-based printing step to a workflow’-section further down.
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:

1.
Start the AutoMerge ServiceManagement from within the Windows start menu. (see screenshot below)
 
start AM service management
Screenshot: ServiceManagement – AutoMerge for MS Dynamics CRM 2011

2. 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).
AMService 
Screenshot: 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’ (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).
AMConfig 
Screenshot: 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 (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 “Retrieve all organizations” button (ellipse 4). After that you, have to “Save the service configuration” (ellipse 5).

Unbenannt 
Screenshot: CRM Connection Setup 
5. Afterwards, click on ‘Start Service’ and the service starts to run in the background (see screenshot below)
Unbenannt 
Screenshot: start service
6. 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 AutoMerge for MS CRM User Guideand read chapter 7 “How to print documents with AutoMerge”.
image
Screenshot: AutoMerge [Printer]-tab within the AutoMerge Service Management.
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 ‘Print to’-step.
 
1. Start your CRM. Go to the ‘Processes’ within the ‘Settings’-area . Here, you have the possibility to create a new workflow.    
crm processes
Screenshot: Processes in CRM 2011 System

image
image 
Screenshots above: 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’ (see screenshot, ellipse 1) and chose ‘Create Record’ from the drop down menu (see screenshot below, ellipse 2).
add printing step 
Screenshot: start to add service-based printing step, click to enlarge
3. Then, open the drop-down menu within the newly added step and chose ‘MSCRM-ADDONS.com AutoMergeWorkingItems’ (see screenshot below).
select AM working item 
Screenshot: start to configure newly added step, click to enlarge
4. Afterwards, click on “Set Properties”. See next screenshot, highlighted in yellow:
image 
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 “AutoMergeAction” to “CreateDocument” 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 “TemplateToExecute” lookup field (in our case its “Account_Overview_DOCX.docx) and as “SaveAs” type we define “PDF”. As “Printer” we have to define to which printer the generated document should be send.
IMPORTANT: 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 AutoMerge for MS CRM User Guideand read chapter 7.1 "How to install and add a printer before using it with AutoMerge”.     

image

Screenshot: AutoMergeWorkingItems, Properties Settings

5)
In the PrimaryRecordUrl we have to add the attribute “Record URL(Dynamic)” from the Account in the menu on the right. That 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 ‘Account’ from the first drop-down menu of the ‘Look for’-area within the form assistant on the right (see screenshot, ellipse 1). Afterwards, select ‘RecordURL(Dynamic)’ from the drop-down menu below (see screenshot, ellipse 2). Then, click on ‘Add’ (see screenshot, ellipse 3) and on ‘OK’ (see screenshot, ellipse 4). Afterwards, the ‘PrimaryRecordURL’-field is automatically filled (see screenshot, ellipse 5). Click on ‘Save and Close’. Now you have appropriately added the service-based printing step. Click on "Save and Close".
image
Screenshot: add PrimaryRecordURL, click to enlarge
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. To do so, follow the steps below:

1.
Click on ‘Add Step’ (see screenshot, ellipse 1) and chose ‘Wait Condition’ from the drop down menu (see screenshot, ellipse 2).
 
add wait condition 
Screenshot: add wait condition, click to enlarge
2. Click on ‘condition (click to configure)’ 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 ‘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 (see screenshot, ellipse 2). The condition now causes that generated documents are only deleted if they have been already printed. Afterwards click on ‘Save and Close’ to complete this workflow step (see screenshot, ellipse 3).
configure wait condition
Screenshot: configure wait condition, click to enlarge
Please do not hesitate to contact support@mscrm-addons.com should you require further information.



Comments are closed.