• Release History
  • Documentation
  • Back to www.mscrm-addons.com
  • Release History
  • Documentation
  • Back to www.mscrm-addons.com
home/Knowledge Base/DocumentsCorePack(DCP)/Generate large documents using the Multipart-feature of DocumentsCorePack 

Generate large documents using the Multipart-feature of DocumentsCorePack 

772 views 0 Updated on May 15, 2025

In certain circumstances, it might be required to generate a sizable document package that consists of hundreds or even thousands of elements.  In previous situations, users ran into the following issues when generating such a package. 

Challenges:

  1. Performance: Every element inside a Multipart-document is generated by the same document generation service which led to lengthy document generation processes 
  2. File Size: Saving a single generated document would fail due to the file size exceeding the Dynamics 365 file size limit 
  1. Storage: Storing every individual document as a note to Dynamics 365 led to increased storage costs 

This article will tackle how to overcome these issues using our Multipart feature via Power Automate. 

NOTE: If you are unfamiliar with how to construct a Multipart Flow, please view the article here.  

1. Performance Improvements: Using Batchsplit 

When it comes to performance improvements, batchsplit can help.  This parameter, when added to the header of the Multipart XML, will split up the workload of generating a document package to multiple services.  This ensures that a document package can be generated more efficiently. 

NOTE: To use this feature, load balancing must be enabled (see more here). 

batchsplit in fetchXML
(Figure 1: The batchsplit parameter added to a section of fetchXML)

2. Avoiding unnecessary capacity consumption and file-size limitations: 
Using Concatenatetype 

This parameter can help reduce the capacity consumed when generating documents by preventing the created document from being stored as a note to the temp record.  You can include this parameter in each docpart that creates a document from a DCP template.  The value of this parameter must be set to 96 as shown in the below image.  

concatenatetype in fetchXML
(Figure 2: The concatenatetype parameter added to a section of fetchXML)

NOTE: When using this parameter, the final document will be saved directly to SharePoint, not Dynamics. 

Example 

To demonstrate these features in action, we can take a look at a particular use case. 

In this example, we want to create a flow that generates multiple Multipart documents that consist of one template for each account record. 

We begin by creating a few variables to be used, along with getting the list of account records.  We will use both of these for a loop later. 

initializing variables in power automate
(Figure 3: Initializing variables and getting the list of account records)

After that, we add the Multipart XML header.  At this step, you’ll notice we have added the batchsplit parameter.  Then, we add another step for one of our variables. 

batchsplit in Flow
(Figure 4: Adding our batchsplit parameter into our Flow)

At this point, we add a loop in order to loop through all of our account records.  Inside the loop, we add our step with the concatenatetype parameter. 

concatenatetype in a Flow in a loop
(Figure 5: Adding our concatenatetype parameter to our Flow in a loop)

A condition step is added to check if we’re at the end of our list of records.  If we’re at the end of our list, the XML footer is added, and then the document is generated via the Create Multipart document (sync) (V3) step.  In the Save Location of this step, we include the URL to our SharePoint site to save our document.  From there, the loop continues until all Multipart documents are generated. 

condition step in Flow
(Figure 6: Our condition step)

Known Issues

File Size limit exceeded: DCP runs into issues storing the (temporary) document back to your environment when generating documents larger than the allowed file size limit for attachments. To avoid such issues, you can:

  • Change temporary document storage location to AzureBlob.
  • Increase file size limit for attachments: The default file size limit for attachments in Dynamics 365 is set to 5120 KB. You can increase this value via the Power Platform Admin Center (see Figure 7)
Change file size limit for attachments in the power platform admin center

Try it yourself! 

Attached below in the “Attached Files” section is the Flow described in the example above. Try it out to see how these features work for you!

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

Attached Files
#
File Type
File Size
Download
1 .zip 4.11 KB MSCRM_ExFlow_LargeDocumentGeneration_BatchSplit_Concatenate

Was this helpful?

Yes  No
Related Articles
  • Deploying DocumentsCorePack: Setup, Automation, and Real Business Impact in Dynamics365
  • Introducing the DocumentsCorePack Template Designer Office Add-In (Beta)
  • 3 Ways DocumentsCorePack Transforms Proposal, Quote, and Contract Creation
  • DeepSign for DocumentsCorePack 
  • Generate and send a document for e-signing using DeepSign
  • How to prepare a document for DeepSign
Latest Articles
  • What Happens After You Deploy AttachmentExtractor: Storage & Cost Savings in Dynamics 365
  • Deploying DocumentsCorePack: Setup, Automation, and Real Business Impact in Dynamics365
  • Introducing the DocumentsCorePack Template Designer Office Add-In (Beta)
  • How to Eliminate Excess Storage Costs in Microsoft Dynamics 365 Without Losing Access to Emails and Attachments
  • 3 Ways DocumentsCorePack Transforms Proposal, Quote, and Contract Creation
Popular Articles
  • DocumentsCorePack Template Designer – Getting Started
  • Step-by-Step: How to configure a One-Click-Action
  • Application Access for Dynamics 365
  • How to find your environment’s unique name in Microsoft Dynamics 365
  • How licenses are counted
Top Rated Articles
  • “Undefined”-labels in Chrome and Edge 114 and higher
  • Important information for Dynamics 365 online customers using DocumentsCorePack and/or AttachmentExtractor
  • How to activate the DocumentsCorePack Connector for PowerApps & Microsoft Flow
  • How licenses are counted
  • How to insert Condition Fields in DocumentsCorePack Templates designer
Categories
  • *News and General Infos* 64
  • Webinars 45
  • Template Designer(DCP 197
  • DocumentsCorePack(DCP 259
  • TelephoneIntegration (TI 65
  • AttachmentExtractor (AE 75
  • PowerSearch (PS 50
  • ActivityTools (AT 61
  • SmartBar (SB 54
  • GroupCalendar (GC 47
Our Vision

“We see it as our purpose to provide products that simplify and speed up our customers’ Microsoft Dynamics 365 experience.”

Knowledgebase
LogIn
mscrm-addons.com
  • Products
  • Online Shop
  • Downloads
  • My Account
About Us
  • About Us
  • Case Studies
  • Newsletter
  • Partner Program
  • Contact
Support
  • Support
  • Terms & Conditions
  • Documentation
  • Webinars
  • Legal Documents
  • Impressum
  • © 2022 www.mscrm-addons.com. All Rights Reserved.