How to download all attachments in MS CRM – MS CRM Attachment downloader

8Aprile 2021 Note: This tool is nomore supported and i have developed an alternative Xrmtoolbox plusgin which can be used for same purpose: https://vishalgrade.com/2021/04/08/how-to-download-all-attachments-in-ms-crm-data-verse-ms-crm-attachment-downloader-xrmtoolbox-plugin/

Recently faced a requirement where crm user wanted to download attachments of certain records from a crm instance.

I thought why not build an application to do the same.

You can download the MSCRMAttachmentDownloader  solution and start making changes according to your need.

I have also created a MSCRMAttachmentsDownloaderInstaller  setup which can be installed on system and you can start using it.

Code is available for the project on github on links mentioned above.

Note:- Application is compatible with on-premise Dynamics crm 2016 or below version as of now.

Let’s test it:-

I have already installed it, you can download it from MSCRMAttachmentsDownloaderInstaller and install:-

Installation Steps:-

Step 1:-

Go to MSCRMAttachmentsDownloaderInstaller  and click download zip as follow:

1

Step 2:-

Unzip the downloaded file, and navigate to debug folder.

In debug, click on setup.exe file and install the application

2
Installation

Follow the simple installation process. The application will get installed.

Downloading Steps:-
Step 1:-

Run the application “CRM Attachment Downloader” from desktop and provide necessary details as shown below:-

3
Logging into application

Step 2:-

Once connected, application will take you to the next page as shown below:-

4.PNG
After login

Step 3:-

Click browse and select a location where you want to download the attachments:-

5.PNG
Select download location

Step 4:-

Get the fetch xml of records for which you want to download attachments.

For example cases created on today:-

6.PNG
get fetch xml query

On clicking download, an xml file will get downloaded, open the file in notepad and copy the fetch xml.

Step 5:-

Replace the default fetch xml with in fetch xml box of CRM Attachment Downloaded  application with copied xml:-

4

Step 6:-

Click the download button. The attachments from all the record of fetch xml result will get downloaded into your selected download location folder:-

8.PNG

Step 7:-

Click view to see downloaded files:-

9.PNG

Hope the application will be useful.

Waiting for your feedback. Also if anyone can contribute to the project, can contact me on grade.vishal@gmail.com.

Happy CRM…!!!

12 thoughts on “How to download all attachments in MS CRM – MS CRM Attachment downloader

Add yours

  1. Hi Vishal- this looks great and this is exactly our use case. We use crm online Microsoft Dynamics 365
    Version 1612 (8.2.2.1458) (DB 8.2.2.1458). However it is unclear what both the organization URL and the domain should be to authenticate. The organization service URL I get from Developer Settings in our application is https://<&gt;.api.crm.dynamics.com/XRMServices/2011/Organization.svc (removed the org). We use office 365 authentication. What would domain be?

    Like

    1. Hey Matt
      Actually this application is for on-premise crm. If you want, i can help you in changing it to make it work for online D365 crm. You can ping me on skype (username : vishalgrade)

      Like

    1. I’m not sure if this tool will get connected to crm 4.0 but I have posted link to the solution itself where you can make changes if tool doesn’t connect to crm 4.0 let me know if if work

      Like

  2. I’m looking to download excel files from D365. Is there a possibility with this downloader? Also, how about scheduling? Thank you!

    Like

    1. Hi Shree, This tool works for onpremise version and download all attachment including excel. You can get code from guithub and change that according to your requirement and schedule the console app/webjob.

      Like

    1. Hi Vitors_14, This tool is not maintained now, instead you can use another tool developed by me which is a XRMToolBox Plugin named
      “Attachment Downloader”. It takes fetch xml of related table, for eg: if you want to download notes from a specific account, provide account’s fetch xml as input and it’ll download all notes related to that account. Xrmtoolbox Reference: https://www.xrmtoolbox.com/ Attachment Downloader Reference: https://www.xrmtoolbox.com/plugins/AttachmentDownloader/

      Please follow to use new tool : https://vishalgrade.com/2021/04/08/how-to-download-all-attachments-in-ms-crm-data-verse-ms-crm-attachment-downloader-xrmtoolbox-plugin/

      Liked by 1 person

      1. Thank you, it will be of great help, I have had many problems with the connection to the XRMToolbox and the SDK, I will solve it and test your plugin, thanks again, I will tell you if I achieve the connection. Greetings

        Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: