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 :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Download the files from the Grid records on click of Custom Download Button

(1) ShareShare
ReportReport
Posted on by 440
Hi All,
 
I have a requirement, where A subgrid contasns the number of records and each record has a document stores on share point.
My requirement like, there should be a download button on grid level, when user will select the records from the grid and will click on the download button then all the documents from each selected record should be downloaded and stored on a local folder.
 
 
Like Below attached SS, there is /File Tracking/ subgrid and here I need to add the download button on subgrid level, as user will select the record then the documents from these records should be downloaded.
 
 
 
And under this file tracking record the documents are  uploaded like this:
 
 
I have added the Download button on subgrid and button click, I am getting the records Id as well.
 
And I have a Field Name /File Path/. In this Field I am storing the sharePoint File path(decoded Url), So here I can get the selected records Id and through that Id I can get the records information and this /File Path/ as well.
 
So Is there Any way to download the sharePoint Documents using the File Path, through javascript??
 
 
 
 
 
I have the same question (0)
  • Suggested answer
    Dengliang Li Profile Picture
    Microsoft Employee on at
    Hi,

    You can leverage the Ribbon Workbench from XrmToolbox: https://www.develop1.net/public/rwb/ribbonworkbench.aspx to perform the ribbon/button changes.
    Step 1. Customize a solution with the entity you want to add button to. Then add this solution in the Workbench.

     
    Step 2. Drag the BUTTON from the Toolbox to the subgrid row.
    The button can be found in the Solution elements below and its display name can be edited in the properties.

     
     
    Step 3. Add an action to the button.
    1. Click the “+ ”button to create a new command. Add the action in the properties, either URL or JavaScript.
    JavaScript needs to be previously uploaded to the WebResourse in Default solutions. And here we have added URL action as an example for the opportunity entity. You can add JS about downloading files here.
    1. Add an enable rule: Show button when record is selected.
    1. Add the enable rule to the command.

     
    1. Add the command to the custom button and publish.

     
    The effect is as shown in the figure, showing the customized button in the Opportunity tab when the record is selected.

     
     I hope my answer is helpful to you! If you have any other questions, please feel free to contact me.
     
    Best Regards,
    Dengliang Li
  • Himanshu Kamboj Profile Picture
    440 on at
    Hi,
     
    I did it Already, like I have added a download button and on select of record, when we will click on download button I am getting the records id.
     
    And through that records Id I can get the records information using retrieve query, but the question is, how to download the document associated to this particular records and this document is store on sharepoint. But the good thing is here, like I have a field name "File Path", this field contains the Document Path on SharePoint.
     
    So is there any way to download the documents from the sharePoint using that File Path??.
  • CU08080724-3 Profile Picture
    2 on at
    Hi,
    Did you solve this problem? Create the button in the grid and download the selected files? Can you show me how you did it? Thanks!

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 > Customer experience | Sales, Customer Insights, CRM

#1
Hamza H Profile Picture

Hamza H 142 Super User 2026 Season 1

#2
Nagaraju_Matta Profile Picture

Nagaraju_Matta 128

#3
ManoVerse Profile Picture

ManoVerse 127 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans