Saturday, August 31, 2013

SharePoint 2013: How To Integrate BCS with Search

Check out the whole SharePoint 2013 Solution Series
New Titles Added Weekly!


This post discusses the overall process of incorporating external data into SharePoint 2013 Search by leveraging Business Data Connectivity Services (BCS). I have an end-to-end solution that integrates product data from a SQL Server database into SharePoint 2013 by using external content types. This is covered in my Search Walkthrough Guide as well as my Enhancing the Search Experience Guide. However, the detailed steps are also available on their own within my SharePoint 2013 Solution Series guides. (Sorting and refinement only appear in the larger).

Step 1: Prepare the Data Source

The first step is to create your read list and read item procedures.
  • Create a stored procedure that returns all of the information you want to search and make sure all rows are returned. 
  • Create a stored procedure that returns the same information but only for a particular entity by using the ID as a parameter.

Step 2: Add Credentials to the Secure Store Service

In order for the External Content Type to be created and BCS to access your external data source, the data source credentials need to be stored. The Secure Store Service in SharePoint allows you to store credentials. For my scenario, a SQL database account was created named “AWDBAccount”. Therefore an entry in the Secure Store Service needs to be added for SQL Authentication.

Step 3: Create an External Content Type

The methods I describe in my books provides the steps for a no-code solution in creating an External Content Type that uses your data source as the provider of information via SharePoint Designer 2013.

Step 4: Set Permissions on the BCS Entity

I can imagine that this is often an overlooked step. Once the External Content Type is created, you need to give permissions to it, otherwise the search account as well as users will not be able to access the data.

Step 5: Create a Content Source for the External Content Type

In order to crawl the external data, you need to create a content source in Search.

Step 6: Create Managed Properties

After the crawl has completed, you now need to create managed properties and map them to the crawled properties from the new content source. This may be accomplished from the Search Service Application UI or from PowerShell. I describe both methods in my guide books.

Step 7: Create a Result Source

Step 8: Create a Result Type

Step 9: Create a Custom Search Results Page

Step 10: Add the Custom Search Results Page to the Search Navigation

Step 11: Test the Results

The results won't look too pretty. The remaining steps involve creating custom search display templates to properly present the external data search results.

Step 12: Create a Display Template

Step 13: Create an Item Hover Panel

Step 14: Update the Result Type to use the Display Template

Step 15: Test the Overall Results


In just 15 simple steps you can integrate external data into SharePoint 2013 Search by using external content types and BCS. You can get the entire end-to-end solution steps in my guides or from my SharePoint 2013 Solution Series:

Check out the whole SharePoint 2013 Solution Series
New Titles Added Weekly!

Matched Content