Implementing BCS Solutions using Stored Procedures

Recently I had a client request a BCS solution to provide custom forms to enable customers to manage their profiles and allow employees and other customers to be able to view those profiles. They wanted a BCS solution instead of a traditional web application with a database backend in order to take advantage of SharePoint Enterprise Search. This approach would allow users to be able to search against any customer information that is stored in SQL Server. In addition, they wanted a SharePoint solution package so that they can deploy/redeploy to multiple environments (Integration, QA, and Production).

Customer’s profile information was in tables but not in a form that was directly meaningful to end users (for example they have different types of contact information as different records in the same table and used as lookups). In addition, some of this data was imported from other systems by timer jobs and triggers. The solution was to abstract the data for the BCS by using stored procedures. So our challenge was to develop a BCS solution package(s) based SQL Server stored procedures.

Sounds reasonable…

If you have read any of the marketing materials on the BCS, you would think that the BCS is most ideal way to achieve the client’s goals. SharePoint articles and books would then state that you can create External Content Types (ECTs) and External lists in SharePoint Designer (SPD) and you can be done in an hour or two. To access this data, you can create web parts that use the SharePoint API to access the External lists just like any other SharePoint list.

Easy, right? Well, let’s explore some of the issues that are common to all BCS Solutions and then take a further look at the issues that this particular approach brings up.  For each issue, I will explain our design decisions and the final solution.

Issue 1: Authenticating a BCS Solution to an External System

Issue 2: Defining and developing your BCS entities into ECTs

Issue 3: BDC Models, Resource files, and making Content Types Searchable

Issue 4: How to develop and deploy the ECTs/BDC Models to multiple environments

Issue 5: Implementing ECTs in SPD using Stored Procedures

Welcome to SPSamer’s blog

SharePoint has been out for more than ten years now and is just reaching it’s maturity.  Along the way, it has increasingly been touted as the be-all-end-all of enterprise platforms and also has been the source of endless user frustration.  These two experiences often go hand-in-hand, as users expect more they often are frustrated when they are not sure how to achieve thier expectations or how things are done in SharePoint are not as simple as their expectations.  This is because SharePoint is a very complex and broad platform aimed at providing Collaboration, Content Management, Business Processes and Intelligence, Portals, Search, Composites, Communities,  Security, Customization, a Services platform, and more.  Along with all this capability comes lots of complexity.  Add to this patches, service packs, multiserver platforms, global deployments, zones, encryption, client Office integration, and cross browser support, it is inevitable that there will be lots of problems.

Not to fear; for every problem in SharePoint, there is either a solution or a work-around.  I have spent the last six years coming up with solutions and work-arounds to every problem that SharePoint has throw at us.  I will be adding many of those solutions and work-arounds and all things SharePoint to this blogs.  In the next few weeks, expect a series of blogs on the BCS and one or two on Search.

I look forward to helping you through your SharePoint travels.