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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

File preview control on a custom form

(1) ShareShare
ReportReport
Posted on by 268
Hello,
 
I would like implement a "file preview" in a custom form. It should have the same look and feel to the "DocumentViewerContainer" on the "DocuView" form. Is there any possibility to use this control WITHOUT DOCUREF, e.g. with someting like System.IO.Stream.
 
 
The document itself is extracted from an 3rd party application and therefore not available as a DocuRef / DocuValue record.
 
Any hints for me?
 
Thanks in advance
Sebastian
Categories:
I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    239,451 Most Valuable Professional on at
    As the object name prefix suggests, this control is specific to document management. If you look into DocuViewerContainer class, you'll see that its logic utilizes things like DocuRef table or DocuAction class. Therefore trying to use it for something unrelated to document management doesn't sound feasible to me. Also, it requires a data source; you can't use it as an unbound countrol and pass a stream to it at runtime.
     
    You could use it a baseline for a custom control, if you really can't put the data to document management tables.
     
    An easier way than building something very different may be supporting temporary buffers in your control and putting the extracted data there.
     
  • Basti Aurand Profile Picture
    268 on at
    Thanks Martin, I was thinking in the same direction. Maybe I will try to use tempory DocuRef / DocuValue table buffers in order to get the control running with the "extracted files".
  • Diego Mancassola Profile Picture
    867 on at
    Hi, totally agree, adding a limitation i found.
     
    During the development of a custom solution to update receipt of an expense, on expense management module, the file preview has a limitation on size, you can't, get a full preview on entire screen, and the customer need this functionality.
     
    I try to do a lot of different approach using code x++ but at the end the only stable solution i can find is to inject a piece of JS on client side to have a full screen preview.
     
     
    If you need this, i can provide you a sample, let me know.
    I will write an article about it in the next future pushing code on a public github repositiory
     
    Diego

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 608

#2
André Arnaud de Calavon Profile Picture

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

#3
CP04-islander Profile Picture

CP04-islander 430

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans