SharePoint 2010: Business Connectivity Services Walkthrough

by Chakkaradeep 20. October 2009 05:44

Business Connectivity Services (BCS) in SharePoint 2010 provides new ways to connect and integrate with external data in SharePoint. Business Connectivity services also allows users to create external content types, external lists based on the external data. This opens up a new dimension on how you view external data in SharePoint. To get to know more about BCS, you can have a look at the Business Connectivity Services poster - http://bit.ly/bcs_poster

Lets get straight to work!

Here is a simple Customers table that you would like to bring to SharePoint.

image

Ideally you want to create a Customers List in SharePoint which can bring this Customers data into SharePoint and be in sync with the external data.

SharePoint Designer to the Rescue

If you are thinking ‘What, SharePoint Designer? Are you crazy!’ – Well, my dear friend, you are in for a surprise with what SharePoint Designer 2010 can offer you!

The first and foremost thing you would notice is the Office Ribbon integration:

Office Ribbon

No more folder views and is replaced by the Navigation pane:

Navigation Pane 

With SharePoint Designer 2010, creating External Content Types is very simple!

Click on the External Content Types in the navigation pane. This will open the External Content Types tab.

Select New External Content Type from the ribbon.

New External Content Type

This will create the new external content type

External Content Type

Go ahead and change the Name and Display Name to External Customers:

To create external connections and operations, click on click here to discover external data source an…

Now you can add connections:

Connections

SharePoint Designer allows to create external data sources connected to:

1) SQL Server

2) .NET Type

3) WCF Services

image

Lets select SQL Server as our external data source is in the SQL Server

Enter your server details. The Database Name will be Customers.

image

Now, I can see the Customers database and the Customers table that I am looking for:

image

Right click and create the operations. Create All Operations will create the necessary Create, Read, Update, Delete operations.

image

Go through the Wizard and complete it.

image

And here are the operations created:

image

Now, you can create External Lists pretty easily from the Ribbon:

image

Fill in your List details:

image

And our external list is created!

image

No pain, no hassles, pretty simple step-by-step procedure!

Integrating with Office Outlook

To go one step, further, you might actually want to use these Customers in your Outlook so that you can store them as contacts. Integrating external data to Office is just few clicks away with SharePoint Designer!

In the SharePoint Designer, Choose the Office Item Type as Contact for the external content type.

image

This will enable Outlook Contacts integration with the external content type.

Rest is to map the appropriate data source fields with Office properties.

 image

Double click on Read Item and map the fields:

image

Select the appropriate Office field from the Office Property for each of the data source element.

Once mapped, save the changes in SharePoint Designer.

Open the external list in the browser.

Under the List tab in the Ribbon, click on the Connect To Outlook button. This will send the external list information to Outlook. As we have configured the external content type as Contact Office Item, they would appear as Outlook Contacts.

image

A new Outlook add-in will be installed:

image

Below is a screenshot of the external data as Outlook Contacts:

image

Sync to SharePoint Workspace

You can also sync this external list with SharePoint Workspace and take the data offline!

image

Here is a screenshot of the external list in SharePoint Workspace

image

Comments

10/24/2009 4:29:45 AM #

SharePoint Frank

Thank's for this great intro Chak!

One question: Is the external list a "real" SharePoint list, with all features. For example can you configure alerts and workflows, to start business actions in SharePoint, if external data changes?

I just compare this exciting new SharePoint Server 2010 (or SharePoint Foundation 2010 ???) features with the Business Data List Connector (BDLC) found here:

www.layer2.de/.../...ness-data-list-connector.aspx

Ok, its a much simpler approach. You don't need SharePoint Designer. Simply enter a connection string, a select statement and primary keys(s) directly in the BDLC custom list settings dialog. That's it. The list structure is created automatically, you can modify it later on. The SharePoint list is updated by a timer job in background (only changed data).

Cheers, SharePointFrank



SharePoint Frank | Reply

10/25/2009 12:34:30 PM #

chakkaradeep

@SharePointFrank - Here is your answer - http://bit.ly/aSaMd

chakkaradeep | Reply

11/2/2009 10:22:59 AM #

trackback

SharePoint 2010: Recopilatorio de enlaces interesantes (I)!

Después de ‘jubilar’ al recopilatorio de enlaces interesantes sobre SharePoint 2007

Blog del CIIN | Reply

11/2/2009 10:23:01 AM #

pingback

Pingback from jcgonzalezmartin.wordpress.com

SharePoint 2010: Recopilatorio de enlaces interesantes (I)! « Pasión por la tecnología…

jcgonzalezmartin.wordpress.com | Reply

12/9/2009 6:40:28 PM #

Rahamath

Hi,

Thanks for the great post, What abou the BI? I havent found much more information abot the Excel and Infopath service in Sharepoint 2010.

Rahamath India | Reply

2/14/2010 7:19:10 AM #

Rafael Perez

Excellent walkthrough! I would like to see some more discussions / community activity around BCS and impersonation with the Secure Store Services. I strongly believe it will have to play a BIG part in just about every BCS scenario. I've written the following blog post blog.rafelo.com/.../...t-error-cannot-connect.html . Which serves somewhat as an introduction; but it’s really just meant to help developers work their way through a specific error.

Wondering what your thoughts are on the Secure Store Service; best practices, and recommendations.  

Rafael Perez United States | Reply

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading



About the author




NZ SharePoint Conference 2010

 

 

New Zealand SharePoint User Group