web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Merge ER generated document with few static PDFs

(2) ShareShare
ReportReport
Posted on by 54

Goal: Merge an ER-generated PDF with other static PDFs into a single PDF.

I am running an ER format from X++ which generates a Word document output, converted to PDF via ER Destination settings. I want to capture the generated PDF as a MemoryStream to merge it with other PDF documents using DocDocumentHelper::mergePdfDocuments. I am also open to alternative approaches.

What I tried: 

  • Custom ERIFileDestination implementation — implemented Microsoft.Dynamics365.LocalizationFramework.ERIFileDestination and passed it via erRun.withFileDestination(). The saveFile method receives the raw Word template before data binding, not the final populated document.
  • ER Archive destination — configured Archive destination with PDF conversion enabled. After erRun.run(), attempted to read the generated file back from DocuRef linked to ERFormatMappingRunJobTable. However the DocuRef record was not found consistently after the run, making this approach unreliable.

Questions:

  1. Is there a supported API or code pattern to capture the final ER output (after data binding and PDF conversion) directly as a MemoryStream in X++, without going through Document Management or Archive destination?
  2. Once the merged PDF is generated as a MemoryStream, what is the best way to display it to the user within D365 (such as opening within a D365 preview pane for immediate viewing)? If that is not possible, opening it in a new browser tab is acceptable as a fallback.
Categories:
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 635 Super User 2026 Season 1

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 635 Super User 2026 Season 1

#3
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 547

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans