Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Sales forum / How to download the do...
Sales forum
Answered

How to download the documents from the SharePoint?

Posted on by 359
Hi All,
 
 
I have a simple requirement to download the document from the SharePoint site.
 
Like I have a subgrid of custom entity, where each record has the document uploaded on sharepoint, the good thing is here like I have the sharepoint site location in each record, at the time of document uploading I am updating the particular record with sharepoint url where the record exists.
 
So Now what I need to do, as I will select the subgrid records and will click the custom button(download button) then all the documents from the selected records should be downloaded from sharepoint to my computer local download folder.
 
Note: document type is not define, means it can be anything (text, pdf, docx, png, xml...etc)
 
Please suggest any way to do it, or is it doable ?
 
And for now, I am passing the selected record array in power automate and through that I can get each record through the Id and there I have the sharepoint URL for every record,
but how to use that sharpoint url to get the document.??
 
 
 
 
Categories:
  • Verified answer
    Himanshu Kamboj Profile Picture
    Himanshu Kamboj 359 on at
    How to download the documents from the SharePoint?
    I have done this thing through the power automate, I am triggering the power automate on click of customs button on subgrid and passing the selected records Id to power automate, there I am using the below listed steps.
     
    Get a row by Id(Getting sharepoint Folder Url From the each Records)
    SharePoint(Get File Properties Only)  (Using Folder Path)
    SharePoint(Get File Content Using Path)
    OneDrive for Business(Create File)
    OneDrive for Business(Create share link by path)
     In the End I am sending the (OneDrive Folder Link)response back to Javascript
    And through the Js I am opening that link in a new tab using window.open(responseLink, 'blank');
     
    Here my documents Downloading from different-2 SharePoint folders to single folder of OneDrive, but only one thing is pending here like it is using my onedrive only to store the documents because my OneDrive is configured with power automate, but I want here like whoever logged-in user want to download  the documents then documents should be downloaded to that particular users OneDrive.
     
    I have added a separate question for this you can refer with this link https://community.dynamics.com/forums/thread/details/?threadid=f018391b-0653-ee11-be6f-00224827e012
     
  • Suggested answer
    PerezAguiar Profile Picture
    PerezAguiar on at
    How to download the documents from the SharePoint?
    Hey!
     
    How about a custom control or custom code, that triggers a javascript (for example) or a PowerAutomate that will connect to SharePoint and download the files?
     
    Regards,

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

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

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,349 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,212 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans