If you’ve ever had the need to add document management capabilities for your entities in CRM, you already know that CRM 2013 and CRM online rely on SharePoint for this functionality. This out of the box integration point is well documented and available for configuration in the CRM administrative interface. When set up, users can create, upload, view and delete documents in SharePoint locations that correspond to entity instances in CRM.
This post will discuss a different integration point – using search in SharePoint 2013 to expose CRM entity data. When setup properly, SharePoint 2013 can provide a robust, enterprise level search capability that can be tailored to your needs. Also, it seems to fill a current functionality gap in CRM that often requires a third party tool. Granted, you will need SharePoint 2013 Enterprise to realize this setup, but if this is available to you there should be no need to look anywhere else for search.
Let’s take a look at the components of the solution. First, I have a CRM online instance that I have provisioned for this post and populated with the sample data set (cases, etc.). This could be CRM online or on premise, the integration works the same in either case.
On the other side, I have an on premise version of SharePoint 2013 Enterprise (which in this case I’m actually running in Azure), with a search service application provisioned and ready to go and a Business Data Connectivity service application up and running. Additionally, I have a SharePoint site set up that will include a SharePoint list based on an external content type (more on the setup of that in a bit) that will surface my CRM data and ultimately make it accessible through search. This site is also where I’ll add a search page to show the functionality once the setup is complete.
What is missing in what we have identified so far is the piece of functionality that will query CRM with valid credentials, transform data (if needed), and make it available to SharePoint in a useful format. The simplest way to do this last part is to expose an OData feed, which SharePoint supports as a source of BDC data (our external content type above). I’ll refer to this piece of code that sits in the middle as my “CRM Proxy”, which is really no more than a WCF data service. My WCF data service is registered in SharePoint as a BCS external data source with a corresponding “Case” external content type. When I have my external content type in place and available in the farm, I can then add an external SharePoint list based on my “Case” content type, and view results from the default view of the list. If I see data coming back successfully, it is an indication that I am ready to add the data model as an external data source and begin crawling it much like I would normal SharePoint content.
The entire setup ends up looking something like this:
Once in place, I can add all of the SharePoint search goodness I want and surface through the Enterprise Search Center or individual site search pages. Custom display templates, content enrichment, and previews (if I created an appropriate display forms for my BDC data) are now in play for my CRM Online data!