SharePoint 2010: Business Connectivity Services Walkthrough

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

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



Oct 25 chakkaradeep

chakkaradeep

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

Nov 02 Blog del CIIN

trackback

SharePoint 2010: Recopilatorio de enlaces interesantes (I)!

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

pingback

Pingback from jcgonzalezmartin.wordpress.com

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

Dec 09 Rahamath

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.

Feb 14 Rafael Perez

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.  

Jul 05 GK

GK

I followed your article.
But I get the error: "Access denied by Business Data Connectivity".
I am the Site Administrator...

Jul 05 chakkaradeep

chakkaradeep

@GK - You can follow my other article - BCS Connectivity Errors - to troubleshoot your errors - www.chakkaradeep.com/.../...vices-Walkthrough.aspx

Jul 05 GK

GK

Thanks Chakkaradeep,

The issue is now resolved.

Jul 14 Terry

Terry

on windows 7 SHarepoint 2010 foundation box when i view the list:

Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Microsoft SharePoint Foundation-compatible HTML editor such as Microsoft SharePoint Designer. If the problem persists, contact your Web server administrator.


Correlation ID:35c1313f-542c-4853-93bd-636a98ae7e61

thanks in advance

Jul 14 chakkaradeep

chakkaradeep

@Terry - please follow my other post on how to troubleshoot SharePoint errors and find the exact error message from the Correlation ID - www.chakkaradeep.com/.../...Point-2010-Errors.aspx

Jul 14 Terry

Terry

Thanks Chakkaradeep

I had to adjust the default throttle.. SO in case anyone needs i am including the like i followed ....

blogs.msdn.com/.../...and-throttle-management.aspx

Aug 10 Mahak

Mahak

Hi, I have an issue. I have created an external list that also inserts new items into SQL server database. In my sql table there are two columns of “datetime” data type that take value in the following format: 2010-08-14 00:00:00.000 when an entry is made directly or data import is done from excel to SQL server table. but when I use SharePoint external list to insert data to SQL server, it makes a wrong entry for the date. eg. If i select 12-Aug-2010 from date time picker, it submits date as following in SQL table: 2010-08-11 18:30:00.000. It always save sdate of one day before the date selected in date picker of infopath form. How can I save the exact date selecetd from external list infopath form to SQL server. ANy help is much appreciated.

date selecetd in sharepoint external list new item form: 12- Aug- 2010
Saved in SQL table as: 2010-08-11 18:30:00.000

Aug 11 chakkaradeep

chakkaradeep

@Mahak - Seems like either the field type might not be properly set. If you can post to SP2010 MSDN Forums (social.msdn.microsoft.com/.../threads) with your BDC file, it would be great to get a collective help on this.

If you open the BDC model file in notepad or XML editor, you will be able to see what is the data type used and get an idea of how BCS is treating your date column.

SharePointFrank

@Mahak: No idea, you can use a REAL SharePoint list connected to external data to compare the results:

www.layer2.de/.../...ness-Data-List-Connector.aspx

It overcomes some external list limitations from my point of view.

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading





Creative Commons License
Chaks' Corner Blog by Chakkaradeep Chandran is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
Based on a work at www.chakkaradeep.com.
Permissions beyond the scope of this license may be available at http://www.chakkaradeep.com.