Recently I developed my first XrmToolBox Plugin : Attachment downloader for MS CRM ( https://www.xrmtoolbox.com/plugins/AttachmentDownloader/ )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 ( https://vishalgrade.com/2018/01/22/ms-crm-attachment-downloader/ ) 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' /> </entity> </fetch>
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 https://github.com/vgrade/XrmToolBoxAttachmentDownloader
You are welcome for any contribution for enhancing the capability of the plugin.
Update 12 May 2022 : Version 1.0.8
Bug Fixed :
- Fixed the bug where files with duplicate names were not being downloaded properly. Tool was just downloading 1 file for all files with same name. It now create files with different names like file.txt, file (2).txt, file (3).txt in your local folder in case multiple files having same names are found in attachment.
- Tool now downloads 1 CSV file named “AttachmentDetails.csv” which have all the information of notes downloaded which is displayed on tool result window.