Skip to main content

Notifications

Power Apps - Microsoft Dataverse
Answered

Preview SharePoint Online document (in an IFRAME) in model-driven apps? (and canvas apps)

(0) ShareShare
ReportReport
Posted on by 361

Is there a way to display SharePoint Online hosted documents in a model-driven app? The scenario is a user needs to review a document (usually a PDF) and transcribe data into the app. It would be useful to have the document side-by-side in the app forms.

 

I am talking about actually rendering the document, not simply using Document Management to render a list of related docs stored in SharePoint.

 

In Canvas apps, I've tried some 'hacks' to get the Canvas PDF Viewer to render thumbnails. Even the highest resolution thumbnails are too grainy to read for our PDF forms.

 

I was hoping we could get the full SharePoint document preview functionality embedded in our model-driven or canvas apps.

 

Thanks!

Categories:
  • Joseph Nasr Profile Picture
    Joseph Nasr 67 on at
    Re: Preview SharePoint Online document (in an IFRAME) in model-driven apps? (and canvas apps)

    Hello is there video/tutorial on this?? How do you do the binding? 

     

    I am currently having this issue where I have an Iframe showing a SharePoint Document Library, I need to select some files, and run a power automate flow (from the Sharepoint appearing in the Iframe) but I need the values of 3 fields that are in the record's form (above the Iframe) for the flow.

  • Len C Profile Picture
    Len C 361 on at
    Re: Preview SharePoint Online document (in an IFRAME) in model-driven apps? (and canvas apps)

    Thanks, @rampprakash. I do see if I use a direct URL to a SharePoint PDF, and allowed xss, the built-in IFRAME control rendered a PDF using the browser's own PDF viewer (which is arguably more usable than SharePoint's PDF previewer).

     

    I'll have to quickly study up on scripting and event handling, but this looks like the path.

  • Verified answer
    Ram Prakash Profile Picture
    Ram Prakash 5,154 on at
    Re: Preview SharePoint Online document (in an IFRAME) in model-driven apps? (and canvas apps)

    Hello @LenC 

     

    There are multiple ways available.

     

    Way 1:

     

    Add an iframe in a Tab then Onload of the Form (using JavasScript) get the Document Location URL and bind it.

     

    Way 2:

     

    Create a button --> On Click of button Use Javascript to open SIDE PAN --> In the Side Pan --> Call the JS and Bind IFRAME there 

     

     

    Let me know if you need more details

     

    Please mark as Answer if it is helpful and provide Kudos


    Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
    Blog : https://microsoftcrmtechie.blogspot.com

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,636

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,942

Leaderboard

Featured topics