How to: Create External Content Types
Last modified: April 16, 2010
Applies to: SharePoint Server 2010
In this article
Describing Connectivity Information in an External Content Type
Describing Data and Operations for an External Content Type
Defining the Office behaviors of an External Content Type
An external content type is a reusable collection of metadata that contains connectivity information and data definitions plus the behaviors you want to apply to a certain category of external data. Creating an external content type is usually the first step in bringing data from external data sources into SharePoint 2010 and Office 2010 applications by using the Microsoft Business Connectivity Services (BCS). After you have an external content type, you can use it with any of the various presentation features of Business Connectivity Services such as external lists, external data columns, and external content controls for Office applications to show external data in SharePoint 2010 and Office 2010. External offer several benefits.
Creating an external content type involves defining the following:
The connectivity information that specifies where the external data is stored and how to connect to it.
The data about a business entity from the external data source (for example, what fields of a Customer you are interested in and what the data types and primary keys are), and what operations to enable on the business entity (for example, whether you want to enable Read, Create, Update or Delete operations on the Customer).
The Office behaviors to attach to the external content type (this step is optional). For example, whether to attach a Microsoft Outlook item type behavior (such as an Outlook Contact or Task) to your external content type and whether to enable users to work on this external content offline in Outlook and Microsoft SharePoint Workspace.
To simplify creation of external content types, Business Connectivity Services offers two development tools: the External Content Type Designer in Microsoft SharePoint Designer 2010 and a Business Connectivity Services Model Designer in Microsoft Visual Studio 2010. If your external data source has a Windows Communication Foundation (WCF), Web service, or a .NET Framework assembly-based integration service or is a simple Microsoft SQL Server database, you can use the External Content Type Designer in SharePoint Designer to discover your external system and create external content types without writing code or XML. However, if your external system is complex or is not supported by SharePoint Designer, you can use the XML Editor in Visual Studio (provides Intellisense) to create your XML model or use the Visual StudioExternal Content Type Designer to create a .NET Connectivity Assembly that provides custom back-end integration logic though .NET Framework code. For more information about when to use SharePoint Designer versus Visual Studio, see When to Use SharePoint Designer vs. Visual Studio When Building Solutions Using BCS.
When you define an external content type, you need to specify the type of the external data source (whether it is a database, WCF or Web service, .NET Framework Connectivity Assembly, or a custom application using a custom BDC connector). You must also provide the security information: what credentials to use to connect to the external data source and whether you are using the Secure Store Service. For more information, see Business Connectivity Services security overview.
You must also provide details of the operations that the external content type will support. You can enable the following operations on your external content type from Office 2010 and SharePoint 2010 applications if your external system supports them:
Other operations that the external system supports. (Note: These types of operations are not supported by SharePoint Designer. You must craft the XML in the BDC model to define such operations.)
For a complete list of operations and what is supported in SharePoint Designer, see Stereotyped Operations Supported by BDC.
For each operation you want to perform on the external data type, you must describe the back-end API that will perform that operation, define its input and return parameters, and select the fields you want returned from the external data source. You can also define filter parameters to limit the external items (rows) coming back from the external system.
You must define whether a specific Outlook item type this external content type maps to and how it should behave. You can choose your external content type to behave like a Contact item, Task item, Appointment item or like a generic list in Outlook.
In addition, you can also enable or disable offline sync support for your external content type. If you do not want to allow users to work on the external content type offline in Outlook or Microsoft SharePoint Workspace, you should disable Offline Sync. By default, it is enabled. If you disable this, then the Connect to Outlook and Sync to Computer buttons will not be available for your external list.