How to download all attachments in MS CRM/Data Verse – MS CRM Attachment downloader XrmToolBox Plugin

Recently I developed my first XrmToolBox Plugin : Attachment downloader for MS CRM ( )which can be used by business users to download attachments from any table in CE.

Long ago I developed a windows application to download attachments ( ) which was for on-premise CRM.

I was getting many requests to add the capability to connect to online CRM as well in same tool. I thought why not build a plugin in our old savior tool XrmToolBox and add the additional capability to connect to online crm.

Now quickly jumping to show you how you can use it:

Step 1: Go to Xrmtoolbox and click on configuration>Tool Library

Step 2: Search for attachment downloader in search box

Select the Attachment Downloader with bug green icon and click Install

Step 3: Connect to your CRM organization in xrmtoolbox and look for Attachment Downloader plugin:

Step 4: Select the location to download

Step 5: Paste the fetchxml of table/records for which you want to download attachments.

For eg: I wanted to download all attachments related to leads so I pasted this fetch xml.

<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>
	<entity name='lead'>
		<attribute name='fullname' />

Note: It’s always a good idea to download notes in chunks by applying filter in fetch xml. If you try to download all notes against a table, there can be huge no of notes which will be downloaded and operation will take time.

Step 6: Click on download button:

It’ll 1st show total no of notes records to b downloaded.

Click yes, if you want to download those notes otherwise click No.

Step 7: Once you click on Yes, you should see the downloaded files details on the screen and downloaded files in the selected folder:

So this was how you can use this tool to download attachments from any table in MS CRM.

Open for any suggestion or feedback. If you like this tool, please rate it on XrmToolBox.

This plugin is open source and code is available at

You are welcome for any contribution for enhancing the capability of the plugin.

11 thoughts on “How to download all attachments in MS CRM/Data Verse – MS CRM Attachment downloader XrmToolBox Plugin

Add yours

  1. Hello Vishal, a pleasure to greet you, I was testing the plugin, but it does not throw me any document, I would appreciate a lot if you tell me if I need something to make it work. I appreciate your guidance.


    Liked by 1 person

    1. Hi Victor, Please change your fetch xml. This plugin need the fetch xml of records against which notes are uploaded. For example if want to download notes attached to a particular account, please provide fetch xml of account table with condition to select particular account. It automatically downloads the notes attached to the resultant records of fetch xml execution. Using annotation fetchxml will not work. Check out in my blog where I have used lead’s fetch xml to download all attachments from lead records.


  2. Hi Vishal, I’m hopeful this tool you built will help me. Is there a way to restrict the amount of attachments to download? I need to gather a sample set of 100 attachments but my date filter seems to be ignored as the results window always says 8296 and I know it is less than that for this date range. Here is my fetchxml:


Leave a Reply

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

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

Google photo

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

Twitter picture

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

Facebook photo

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

Connecting to %s

Blog at

Up ↑

%d bloggers like this: