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 DocumentsCorePack

DCP Server offers a service-based printing option which is additionally available to the already known plugin-based printing option. This additional option is based on a service which is running in the background.

DCP ServerBased printing feature provides the possibility to create and manage printer configurations for starting:

  • local print jobs via DCP Server Local Printer Configuration (supported format: .pdf)
  • global print jobs online via Google CloudPrint Configuration (supported formats: .docx, .pdf, .html. .jpg, .bmp)

Requirements: DocumentsCorePack ServerBased for MS Dynamics CRM v5.30 and higher

A) How to create a service for document printing
B) How to add the service-based printing step to a workflow or dialog
C) Exception 1: How to add the service-based printing step to already existing workflows
D) Exception 2: How to add the service-based printing step to workflows including a Delete Document-step.

Please note: If you already run a service for printing documents (as this is quite usual when using DCP Server with CRM Online), you can skip the first section of this article and can continue reading in section B).

A) How to create a service for document printing 

Before you can to add service-based printing to a workflow, you need to configure and start a service.

A1) Start the Service Configuration DocumentsCorePack for MS CRM 2015 from within the Windows start pane. 
image
Figure 1: Look for ServiceManagement in the Start-menu 

A2) Once opened, create a new service or select an existing one. If you want to create a new service, type in the name of the service and click on the green tick mark. 
Please note: Once set, the ServiceName cannot be changed anymore! Click on the [Save service configuration]-button in order to proceed.  
image
Figure 2: DCP ServerBased Service Overview

A3) Next, define which type of jobs the service should work on. Select only print jobs. You have also the possibility to set a filter for the printer to be used. This is essential e.g. in the following case: If you have offices in Austria and in the US, you can type in the name of the printer located in your office (e.g. at your Austrian office) in order to avoid that your documents are printed by the printer located in the other office (eg. at your American office) .
image
Figure 3: Select which type of jobs the service should work on

A4) Then, switch to the CRM Connection Setup-tab, select your CRM type, type in the CRM Server-URL and click on the [Retrieve all Organizations]-button. Select the appropriate organization and click on the [OK]-button.
image
Figure 4: CRM Connection Setup-tab 


Now the below window appears. There, click on the [OK]-button in order to confirm your setup. 
image
Figure 5: Confirm your setup

If the below message box pops up, click on the [OK]-button. 
image
Figure 6: Possible issue with CRM connection- message box

A5) Afterwards click on the [Start Service]-button and the service starts to run in the background and can be found in the Active Services-tab.

A6) After having configured and started the service for printing (in our example “DCPServerPrinting” switch to the DCP Server [Printer] tab. Click on [New] to add and configure a printer which should be used afterward within the workflow. For more information, please download our DocumentsCorePack ServerBased User Guide and read chapter 7.3.1.1 DCP Server Printer Tab Overview.

B) How to add the service-based printing step to a workflow or dialog: step-by-step-description

B1) Start your CRM. Go to Settings and Processes. There, you have the possibility to create a new workflow. 
image
Figure 7: Change Logon

 

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

B3) Then, open the drop-down menu within the newly added step and select MSCRM-ADDONS.com AutoMergeWorkingItems.
image
Figure 10: Select MSCRM-ADDONS.com AutoMergeWorkingItems

B4) Now click on the [Set Properties]-button
image
Figure 11: Click on the [Set Properties]-button

A new window opens. Within this window, you can continue to configure the newly added steps. Type in the name of the step (1) and select PrintDocument as AutoMerge Action (2). Then go to the Print Document-section and click on the look-up-field next to the Printer-field and define which printer should be used (3).

Please note: Before you select 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 that you used during the printer installation process. For details, please see DCP ServerBased User Guide.
image
Figure 12: Configure the newly added step

B5) Finish configuring the service-based printing step by adding the PrimaryRecordURL. To do so, you have to select CreateDocument:OutputDocumentRef from the first drop-down menu of the Look for-area within the form assistant on the right (1). Afterward, select RecordURL(Dynamic) from the drop-down menu below (2).

Then, click on the [Add]-button (3) and on the [OK]-button (4). Now the PrimaryRecordURL-field is automatically filled (5). Click on the [Save and Close]-button in order to proceed. Now you have appropriately added the service-based printing step.

Please note: If there is already a printer name specified in the PrintTo-field of the Create Document-section, you have to delete this name to avoid double printing (6).
image
Figure 13: Finish the configuration of the step


C) Exception 1: How to add the service-based printing step to already existing workflows 

Select the workflow which you would like to modify and deactivate it.
Then, double-click on it and open the CreateDocument-step by clicking on Set Properties (1). A new window opens. Here, delete the printername (2) and click on the [Save and Close]-button.
image
Figure 14: Modify the CreateDocument-step

After having deleted the plug-in based printer step, you can add the service-based printer step directly after the already existing Create Document-step of the workflow. To do so, please follow the steps in section B). 


D) Exception 2: 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 you add a Delete Document-step to your workflow. 


D1)
Click on Add Step (1) and select Wait Condition from the drop-down menu (2)
image
Figure 15: Add Step - Wait Condition

D2) Click on condition (click to configure) within the newly added wait condition (1). 
image
Figure 16: Condition (click to configure)

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).
image
Figure 17: Configure the Wait Condition  

The condition now causes that generated documents are only deleted if they have been already printed. Afterward, click on the [Save and Close]-button to complete this workflow step (3).

That’s it! We appreciate your feedback! Please share your thoughts by sending an email to support@mscrm-addons.com.




Comments are closed.