target audience

Written by

in

How to Archive CRM 2011 Email Attachments to SharePoint Microsoft Dynamics CRM 2011 is a robust tool for managing customer relationships, but storing large email attachments directly inside its database can quickly exhaust your storage limits. Database storage is expensive and degrades system performance over time. Moving those attachments to SharePoint resolves these issues while keeping your documents accessible.

This guide provides a step-by-step approach to archiving CRM 2011 email attachments to SharePoint. Why Archive Attachments to SharePoint?

Storing attachments in SharePoint rather than the CRM database offers three major advantages:

Cost Efficiency: SharePoint storage is significantly cheaper than SQL Server database storage.

Performance Optimization: Reducing database size speeds up CRM backups, indexing, and overall query performance.

Better Document Management: SharePoint provides advanced document features like version control, full-text searching, and easier external sharing. Prerequisites

Before beginning the migration, ensure you have the following components ready:

Microsoft Dynamics CRM 2011 (On-Premises or Online) with Administrator privileges.

SharePoint (2010, 2013, or Online) site configured and accessible.

The Microsoft Dynamics CRM List Component installed on your SharePoint site (required for the native grid integration). Method 1: Native Document Management Integration

Dynamics CRM 2011 includes a built-in document management feature that links CRM records to SharePoint folders. Step 1: Enable SharePoint Integration Navigate to Settings > Document Management. Click on Document Management Settings. Enter your SharePoint Site URL and click Next.

Select the entities you want to enable for document management (ensure Email is checked).

Define the folder structure (e.g., organized by Account or Contact) and click Finish. Step 2: Manual Attachment Upload

Once enabled, users will see a “Documents” section in the left navigation pane of an Email record. Users can manually upload files here, which saves them directly to SharePoint instead of CRM.

Method 2: Automated Archiving Using Custom Workflows or Plugins

The native integration works well for new, deliberate uploads, but it does not automatically strip attachments from incoming emails. To automate this process, you must create a custom workflow activity or a .NET plugin using the CRM SDK. Step 1: Detect the Email Attachment

Your custom code must trigger on the creation of an activitymimeattachment record associated with an email. Step 2: Extract and Upload to SharePoint The code must perform the following actions:

Retrieve the attachment’s text/binary data from the body field of the attachment entity.

Authenticate with the SharePoint Web Services (or Client Side Object Model – CSOM).

Create a folder in SharePoint corresponding to the CRM Email ID or the regarding record ID. Upload the file binary into that SharePoint folder. Step 3: Clean Up CRM Storage

After successfully uploading the file to SharePoint and verifying its existence:

Create a note (annotation) or update the email body with a direct URL link to the new SharePoint file location.

Delete the original activitymimeattachment record from CRM to reclaim database space. Method 3: Third-Party Integration Tools

If you prefer not to write and maintain custom .NET code, several third-party tools can automate this process seamlessly.

SSIS (SQL Server Integration Services): Using KingswaySoft or CozyRoc adapters for CRM and SharePoint, you can build a scheduled ETL pipeline to extract, upload, and delete attachments on a nightly basis.

Commercial Add-ons: Tools specifically built for CRM storage optimization can automatically move attachments to SharePoint in real-time, leaving a lightweight hyperlink behind in CRM. Final Best Practices

Backup First: Always run a full SQL backup of your CRM organization database before executing any automated deletion scripts.

Security Mapping: Ensure that your SharePoint folder permissions mirror your CRM security roles so sensitive attachments remain restricted.

File Name Handling: Implement error handling in your automation to sanitize illegal characters (like #, %, or &) from file names, which SharePoint may reject.

By moving your CRM 2011 email attachments to SharePoint, you will extend the lifespan of your CRM deployment, cut infrastructure costs, and provide your team with a superior document management experience. To help tailor this guide further, let me know: Is your CRM 2011 environment On-Premises or Online?

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *