Skip to main content

XrmToolBox Bulk Attachment Manager - Version 2018.2.2.7 Released!

Today I have published version 2018.2.2.7 of my XrmToolBox plugin.  The purpose of this plugin is to make it easy to download and backup attachments in CRM.  This release is a major release as it is the first built version with all pieces working.  The first version only had note downloads working.

Overview of Plugin:
How To Use The Tool:
  1. Launch XRMToolBox.
  2. Connect to organization.
  3. Step 1, choose what you want to download. (Once a choice is made, Step 2 becomes usable)
    1. Notes - Download attachments from note entity.
    2. E-Mail - Download attachments from emails.
    3. Both - Downloads attachments from notes and emails entities.
  4. Step 2, choose if you want to download all attachments in the system or specific attachments.  
    1. All Attachments - This will search the chosen entity to find all records that have an attachment and download them.
      1. Click on "Browse" and choose where to download the attachments too.
    2. Specific Attachments - You will need to provide a .csv file with a GUID(s) of the records you want to download.
      1. Click on "Browse" and choose the .csv file to use.  Attachments will be downloaded to the same location as the .csv file.
  5. Step 3. click on "Run".
  6. When complete, in step 4 click on "Export Results".  This will export the data in the output area into a pipe delimited (|) .csv file.
Notes:
  • Note attachments are stored in a "Note Attachments" folder at the download location chosen.
  • Email attachment are stored in a "Email Attachments" folder at the download location chosen.
  • Inside the folder mentioned above are other folders.  The folder for each of these sub-folders is the GUID of the source record (Note / Email).  This way we can maintain the relationship of the records.  Within this folder are the attachment(s).
If you run into any issues with this plugin please report the issue against the GitHub Project.

Comments

  1. Thanks for this helpful tool!

    I have an on-premesis 2011 installation of CRM and am attempting to download all 10,000+ note attachments.

    I first tried the "All Attachments" option, and it appeared to be working well until it reached the 883rd attachment, when it simply stopped downloading the files without any error message.

    I then built 12 csv files to specify annotationId values for batches of 880 IDs in each file.

    I was then able to use the "Specific Attachments" option to download 5 batches of 880 files without a problem, but when I reached the 6th batch, it stopped after 173 records. I then made a copy of the 6th batch file, removing the first 173 records, but when I tried to run that file, nothing happened. I removed the first ID from that file, and still nothing happened.

    I then tried the 7th batch file, and I was able to download 500 or so of the 880 files, and then it stopped.

    I then tried the 8th batch file, and I was able to download 100 or so of the 880 files before it stopped without warning.

    At this rate, it's going to take a long time for me to figure out how to download all the files.

    Is there something I can do to ensure that all the files download successfully? Is there an error log somewhere that would tell me what the problem is?

    ReplyDelete
  2. What should the CSV file look like to the "Specific Attachments" option? Currently I have two files I have tried. Both are .csv files. One has the guids of the attachments and one has the guids of the emails. not sure which to use and neither creates an output.

    ReplyDelete
    Replies
    1. I am struggling with the exact same thing. If I figure it out I will come back and respond.
      Holly Pennington

      Delete
    2. Hello, I have the same problem. Has anyone managed to get this working?

      Delete

Post a Comment

Popular posts from this blog

Validating User Input In CRM Portals With JavaScript

When we are setting up CRM Portals to allow customers to update their information, open cases, fill out an applications, etc. We want to make sure that we are validating their input before it is committed to CRM.  This way we ensure that our data is clean and meaningful to us and the customer. CRM Portals already has a lot validation checks built into it. But, on occasion we need to add our own.  To do this we will use JavaScript to run the validation and also to output a message to the user to tell them there is an issue they need to fix. Before we can do any JavaScript, we need to check and see if we are using JavaScript on an Entity Form or Web Page.  This is because the JavaScript, while similar, will be different.  First, we will go over the JavaScript for Entity Forms.  Then, we will go over the JavaScript for Web Pages.  Finally, we will look at the notification JavaScript. Entity Form: if (window.jQuery) { (function ($) { if ...

Power Pages Update Last Successful Login Using JavaScript and Power Pages API

 Recently while working on a Power Pages implementation for a client, I had the requirement to show the last time a user logged in on their profile page.  I thought this would be easy to do as there is already a field on the contact record for "Last Successful Login" (      adx_identity_lastsuccessfullogin).  This use to update when a user logged in, but it appears Microsoft has removed that automation. While searching I came across a few different ways of achieving this task.  One used application insights in Azure and another one used an HTTP endpoint setup in Power Automate.  I thought, this needs to be simpler.  What I came up with is to use Liquid with JavaScript to tell if a user is logged in or not.  Then use the new Power Pages api to update the logged in users contact record to mark the last time they logged in. Here is the approach I setup: 1) Make sure you turn on the api for contact in Site Settings. 1) Link to Microsoft Do...

Reusable Method To Get Record By Id

I have a handful of reusable code that I use when creating plugins or external process (i.e. Azure Functions) for working with DataVerse. The first one I am providing is Getting a Record By Id: 1: private static Entity GetFullRecord(string entityName, string primaryKey, Guid recordId, IOrganizationService service) 2: { 3: using (OrganizationServiceContext context = new OrganizationServiceContext(service)) 4: { 5: return (from e in context.CreateQuery(entityName) 6: where (Guid)e[primaryKey] == recordId 7: select e).Single(); 8: } 9: } entityName = The logical name of the entity primaryKey = The primary key field for the entity. If using late binding you can create this dynamically by doing: $"{target.LogicalName}id" recordId = Guid of the record to get service = Service to interact with DataVerse