See how Microsoft Consulting Services can help you
Contact Microsoft Services
Contact The SharePoint Guys
Apply for a job at Microsoft Consulting Services
MCS Solution Dev
The Deployment Guys
MSDN UK Newsletter
MSDN UK Team Blog
TechNet UK Newsletter
TechNet UK Blog
One of the feature in SharePoint 2010 which has received one of the bigger facelifts is Business Connectivity Services (BCS) – what we used to call Business Data Catalogue (BDC) in SharePoint 2007. This is a really powerful set of tools for connecting external data into SharePoint. If you are not familiar with BCS, I’d recommend the following sites to get up to speed (the rest of this post assumes you are familiar with BCS).
Overview of Business Connectivity Services from the BCS Team Blog
Introducing the External Content Type from the BCS Team Blog
What's New: Business Connectivity Services from MSDN
Microsoft Business Connectivity Services general resources on MSDN
One of the primary objects in BCS is the External Content Type. This establishes a link between BCS and the ‘entity’ in your data system such as ‘customer’, ‘order’, ‘product’ etc
You can very quickly create External Content Types using SharePoint Designer. There are plenty of articles on how to do this, here are a few that helped me:
External Content Type in SharePoint Designer – SQL Server from Lightning Tools Blog
How to: Create an External Content Type Based on a SQL Server Table from MSDN
(Video) Create External Content Types using SharePoint Designer 2010 from www.SharePoint-videos.com
Throughout this post, I’ll be using the Adventure Works sample database for SQL 2008 which you can get from here. Specifically, I’ll be using an External Content Type I created called ‘Products’ which is based on the the ‘vProductAndDescription’ view – if you want to follow my steps exactly, please pre-create this External Content Type, otherwise, whenever you see ‘Products’, substitute that for the name of your external content type.
Please ensure that your External Content Type has at least Read List and Read Item methods configured. These are the minimum methods required for search (and most BCS operations actually).
It is not mandatory that you configure a title property for your BCS external content type but this is essential if you want meaningful search results. You can configure this in SharePoint designer by following these steps:
When users click on a BCS item from search result, the data for that BCS item will be displayed in the ‘profile page’.
This is basically an ASPX page with a few BCS web parts on.The view profile action passes the entity’s ID data into the query string and the web parts use this data to display the relevant BCS entity.
These profile pages are not setup by default, it is something that you must manually configure, if you do not configure you’ll get a ‘404’ error when you try to click on any BCS search results (I will not tell you how long it took me to figure that one out!! :) ). To configure the profile page follow these steps:
No this has been created, you’ll notice that there is now a default action pointing to an ASPX page in the site you created where the ID is passed in via the query string.
Now that the External Content Type is fully configured, we can create configure the indexing.
BCS indexing is very simple, you simply add the BCS data source as a new search Content Source in the Search Service Application. Follow these steps:
In order to test the search you’ll need a site that is configured to perform enterprise searches. The easiest way to do this is to create a Enterprise Search Centre site. To do this, follow these steps:
PS: Happy Xmas and a Merry New Year! I hope you enjoy my special one-off profile photo! :)
This article was published by
Martin Kearn Senior Consultant Microsoft Consulting Services UK Martin.Kearn@Microsoft.com
Click here for my bio page
Please feel free to contact me directly via email or via the blog comments if you have something to say about this article.