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!


How to use the CreateMultiPartXML based on FetchXML

This blog article outlines how to create a document for every contact of an account using the CreateMultiPartXMLbasedonFetchXML step. 

Please note: You have to make sure you first look into the basics of DocumentsCorePack workflow-steps, fetchXML and Dynamics 365 workflows before you start with this. It will make the progress a lot easier. 

In this case, we want to create a document for every contact of an account. To achieve this we need the CreateMultiPartXMLbasedonFetchXML step. 

1) Therefore create a new workflow based on  Account. Go to ❶ DCPWorkflowSandbox and select  CreateMultiPartXMLbasedonFetchxml, like you can see below. 

2) Next define the properties of your new workflow step by clicking the [Set Properties]-button, highlighted below. 

❷ Entity Record URL Base: The Record URL of our main entity Account 

❸ FetchXML: The XML we want to execute. (How to build such an XML will be explained later in this article)

❹ FechtSMLResultField: The ID-Field of the returned entities - ContactId in this case

❺ FetchXMLResultEntity: The name of the returned entity (contact in our case) 

 

4) Next, add a second step: Create Record - MSCRM-ADDONS.com AutoMergeWorkingItems.

 

5) Then define the properties as follows:

 

 AutoMergeAction: Create Document

❸ PrimaryRecordURLFetchXML: The Record URL of the primary entity (in our example Account)

 SaveAs: Your desired output (in this example pdf)

 MultiDocumentXML: The XML output of the previous step 

How to create the Fetch XML

You can use 3rd party tools like "XRMToolBox" to make the creation of the FechXML easier. 

1) Use the Dynamics 365 Advanced Find to get the base structure of the Fetch XML you want,  like you can see below. In this case, we wanted to merge all contacts of a particular Account. 

2) After building this verifying the result, download the FetchXML and paste it into your XML editor. Adjust the FetchXML so it can be executed correctly and has no syntax errors. 

 

4) Then copy the finished XML and paste it into the CreateMultiPartXMLbasedonFetchXML step into the field FetchXML.

 

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

 

 




Comments are closed.