In October 2014 I will be giving a talk to the Geneva SharePoint User Group about the integration options between Dynamics CRM and everyone’s favourite document management repository. It’s a rich subject with a lot of blog posts, Microsoft white papers and general articles and so here is a condensed version if you’re looking for a quick overview of the fundamentals of integrating the two – both the “out of the box” features and the possibilities for extending the functionality with custom code.
I have included a list of references at the end to draw them in to one place and my material for the presentation (including a PowerPoint overview) is available on OneDrive here: -
First a word about the versions of SharePoint that are compatible with CRM: -
Simply, if we do not perform any integration then SharePoint cannot access/benefit from any of the data in CRM and CRM cannot use SharePoint as a repository for its documents and the only option for working with files will be to attach them to CRM Activity or Notes. Files attached in this way will, of course, not be searchable.
Figure 1: Without SharePoint the only option is to attach documents to Notes/Activities.
CRM 2011 and 2013 add slick “out of the box” integration options to get CRM and SharePoint working together and these are configured via the CRM Settings > Document Management page. For CRM 2013 online a pop-up alert appears at the top of the page nagging you to set this up.
Essentially you point your CRM at a SharePoint instance and select whether you want to create folders for each entity type or create sets of folders underneath a Contact / Account parent node. Whenever you then wish to associate documents with your CRM record, a SharePoint folder is created (if one does not exist) and the uploaded material is placed there. A recent enhancement in the Spring 2014 release of CRM is that the SharePoint folder now contains the CRM record GUID to make this easily available to any SharePoint code.
To present the documents stored on SharePoint within CRM there is the free CRM List Control. This gets installed on the SharePoint server (under Site Settings > Web Designer Galleries > Solutions) and presents the list of documents in a style consistent with CRM’s look and feel. If this List Control is not installed then CRM simply renders an IFRAME to show the SharePoint contents.
With CRM 2011 and (I believe) 2013 on-premises you need to download and install the List Control yourself but if you’re working with CRM and SharePoint online then the List Component is not required and direct server to server communication can be enabled instead.
Figure 2: The List Components renders SharePoint document lists with familiar CRM look and feel.
Another nice simple option, you can expose CRM pages within SharePoint and vice-versa by simply setting up IFRAMEs and referencing the appropriate URL. This is particularly useful when you want to deliver CRM Dashboards or SharePoint document lists that are not linked to CRM data.
Security considerations are important here t ensure that the authenticated user works across both sites.
Figure 3: IFRAME used for delivery of data within a CRM Dashboard.
SharePoint includes the Business Connectivity Services to allow SharePoint Team Sites to display and work with data from a range of other sources. You’ll need the free SharePoint Designer to configure this but the basic steps are to create an External Data Source and set up the Lists and Forms that SharePoint will use to display the data retrieved.
I set up a demonstration for CRM 2013 on-premises and SharePoint 2010 by setting up a SQL Server External Data Source referencing the CRM database. The only supported way to work with data within the CRM database is via the Filtered Views and so this method can be used to present Read-Only data but not to allow Updates and Deletions of CRM data from SharePoint.
Figure 4: CRM Data delivered as a SharePoint list via the Business Connectivity Service.
The previous example of using the Business Connectivity Services can be extended to set up a SharePoint Basic Search Centre relying on the External Data Source of a CRM database. This is particularly useful if you want to search multiple entities within the CRM with SharePoint.
Figure 5: Creation of a SharePoint Search site working with CRM data.
Although it strays a little from the subject of SharePoint and CRM integration, it is worth noting that Excel 2013 comes with an ORest connector that can be used to pull CRM data in to Excel for Power Viewm Power Pivot and Power Map visualisations. Data Models can be built and data from several sources linked within Excel to provide a “mash up” of CRM and SharePoint data.
The final Excel containing the data model and its reports can either be uploaded to a SharePoint site document list and opened with Excel online or can be published to the dedicated Power BI site offered as a service via Office 365.
Power BI looks set to become then the quickest and easiest way to deliver reports using both SharePoint and CRM data.
Figure 6: Exploiting CRM data within Excel for Power BI.
Finally, the web service endpoints exposed by SharePoint and CRM can be used by custom code for bespoke integration. CRM exposes both SOAP/WCF and ORest services and one thing to note is that if you’re planning to integrate CRM 2013 and SharePoint 2010 you’ll need to create your own proxy service in the middle as CRM 2013 is .Net 4.0 and SharePoint 2010 Web Parts only support .Net 3.5.
The CRM SDK contains sample code showing you how to programmatically work with the SharePoint entities within CRM.
Figure 7: C# Code executing against CRM to work with SharePoint data.
The core intention is to use SharePoint as a document repository for CRM but the possibilities of working direct with Filtered Views in the CRM database (for on-premises), with Power BI and with the CRM SOAP and ORest web services means that SharePoint could just as easily be used to deliver CRM Reports or be a portal solution on top of CRM data.
For companies already using SharePoint as their key collaboration and communication tool, there are therefore plenty of options for bringing CRM “in to the fold” and making its functionality available.
Here’s a list of useful articles and references – everything you could possibly want to know about SharePoint and CRM!
Overviews & Introductions
Walkthrough of setting up CRM Online and SharePoint Online: –
Blog Series on Various Integration Options
Shortcomings of Security Model
Power BI in CRM
Using BDC service within SharePoint to pull in CRM data.
Calling SharePoint from CRM