What's new for Business Connectivity Services in SharePoint 2013
Applies to: SharePoint Foundation 2013, SharePoint Server 2013
Topic Last Modified: 2015-02-12
Summary: Learn about the new features and capabilities of Business Connectivity Services (BCS) in SharePoint 2013, including OData, BDC models, and apps for SharePoint.
The SharePoint 2013 and the Office 2013 suites include Microsoft Business Connectivity Services. With Business Connectivity Services, you can use SharePoint 2013 and Office 2013 clients as an interface into data that doesn’t live in SharePoint 2013 itself. It does this by making a connection to the data source, running a query, and returning the results. Business Connectivity Services returns the results to the user through an external list, or app for SharePoint, or Office 2013 where you can perform different operations against them, such as Create, Read, Update, Delete, and Query (CRUDQ). Business Connectivity Services can access external data sources through Open Data (OData), Windows Communication Foundation (WCF) endpoints, web services, cloud-based services, and .NET assemblies, or through custom connectors.
This article lists the new and enhanced capabilities of Business Connectivity Services in SharePoint 2013. If you are new to Business Connectivity Services, see Overview of Business Connectivity Services in SharePoint 2013. To learn more about changes and new features for developers that have been added to Business Connectivity Services (BCS) for SharePoint 2013, see What's new in Business Connectivity Services in SharePoint 2013 in the MSDN Library
In this article:
Business Connectivity Services supports Anonymous, Basic, Windows, and Custom authentication to OData services when it is used with the Secure Store Service. If you want to apply permissions at more discrete levels, use OData connections. OData connections provide an easier way to create BDC models that work for both SharePoint 2013 and Office 2013 client applications. In SharePoint 2013, you can connect external lists that are surfaced through OData to Office 2013 clients and you can work with the data when you are offline. When the Office 2013 client reconnects, it performs bidirectional synchronization with the OData source.
|A user's identity is not a supported authentication type in SharePoint Online when used in combination with the Secure Store Service.|
Before SharePoint 2013 or SharePoint Online can be used as an interface to external data, they must understand what kind of data source it is, how to talk to it, and what kind of authentication the external system expects. These items — and also which tables to read, which items from those tables are of interest, and which operations to perform on them — are all described to Business Connectivity Services in a BDC model. In SharePoint 2013, you must use Visual Studio 2010 to create BDC models for OData data sources. To make the BDC model creation process smoother, Visual Studio 2010 will be able to connect to the OData endpoint through Business Connectivity Services and read the OData source. Visual Studio 2010 will then automatically generate the BDC model based on the available metadata. The BDC model can then be either imported into the Business Data Catalog as a farm-scoped external content type, or be included in an app for SharePoint. Farm-scoped external content types can be used in external data lists, business data Web Parts, or business data in lists anywhere across the SharePoint farm.
The BDC model will not contain any filters because it is not possible to know what these would be beforehand. By default, Visual Studio 2010 will generate all the Business Connectivity Services operations for all the OData operations (Get, Put, Post, and Delete).
SharePoint 2013 provides an event listener. The event listener includes an event subscriber on the SharePoint 2013 side. The subscriber receives notifications from the event publisher (on the external system side) on changes to the data and then initiates predefined actions when changes occur. This enables SharePoint users and custom code to receive notifications of events that occur in the external system. The users and custom code need to explicitly subscribe to events on entities for which they want to receive a notification. The external system can use any of the supported connections (OData, SQL, or WCF) for transactions with the external system. However, to support eventing, the external system must implement interfaces that allow users to subscribe to events and it must send the notifications back as ATOM feeds or JSON objects to the SharePoint 2013 endpoint.
SharePoint 2013 supports a pull model for getting data from an external system and it introduces a subscription model. In this version, developers can create BDC models that subscribe to published events from an event publisher in the external system. The developers can target a particular entity in the external system, such as the Customer entity, and receive notifications about events that are published on that entity. This enables developers to write custom code for external lists that trigger SharePoint events when data is changed. SharePoint users can also subscribe to alerts on external lists that are associated with a BDC model in which a developer has defined a subscription. For example, you can create a custom event on an external list that sends an email message to an employee when a customer account is assigned to that employee in the external system. You can do this by subscribing to a particular event (or alert) on a particular view of an external list. Note that users can subscribe to an event the same way that they did in SharePoint Server 2010. For information about how to subscribe to an alert, see Create an alert or subscribe to an RSS Feed on Office.com. For more information, see “Receiving Events from External Systems” in What’s new in Business Connectivity Services for developers in the MSDN Library.
SharePoint 2013 introduces apps for SharePoint. By using apps for SharePoint, you can add functionality to a SharePoint site by using the self-contained app for SharePoint. When installed, apps for SharePoint do not make any changes to the underlying code on the computer that is running SharePoint Server. Therefore, each app for SharePoint is isolated from the rest of the system. Because apps for SharePoint contain all the resources that they need to function, they are very safe to use and also can be uninstalled cleanly. This article focuses on Business Connectivity Services support for apps for SharePoint. Business Connectivity Services supports apps for SharePoint in two ways. First, BDC models can be scoped to apps for SharePoint. Second, connection information is defined and stored separately from the app-scoped BDC model in BDC connections.
In SharePoint 2013, developers of apps for SharePoint can package BDC models in an app for SharePoint. The Business Connectivity Services runtime then creates external content types that are scoped to the app for SharePoint. This limits use of the external content type to the app for SharePoint. Connection properties can be specified in two ways, either in the BDC model that is contained in the app for SharePoint or in a Business Connectivity Services connection settings object that is created and stored in the Secure Store. Otherwise, if you connect to a data source that requires authentication, the connection must be defined separately in the Business Connectivity Services layer by a developer. Also, an OData connection must be used to connect the app for SharePoint to the external data source. By defining the connections separately from the BDC models that are packaged within the app for SharePoint, administrators can more easily manage connections to external systems. A Business Connectivity Services connection settings object is a combination of the following:
A name for the connection.
The endpoint URL of the data source.
A declaration of the credential type and authentication method that will be used to authenticate with the endpoint URL of the data source. You must use a credential type and authentication method that is supported by the external data source. For example, you can declare that the connection will use the credentials of the user that is logged in or a different set. Certificate details can be included also.
When an administrator installs an app for SharePoint that needs to access a data feed through Business Connectivity Services, the app for SharePoint must use a BDC connection. During installation, the administrator must grant permission to the app for SharePoint to use the appropriate BDC connection. Note that external content types created from an app-scoped BDC model are scoped to only the app for SharePoint that contains the model. However, multiple apps for SharePoint — each of which contains an app-scoped BDC model — can all point to the same Business Connectivity Services connection settings object. In this way, connection settings can be reused across different apps for SharePoint. For more information about what’s new for developers forapp-scoped external content types and how to create a connection, see “App-Scoped External Content Types” in What’s new in Business Connectivity Services for developers in the MSDN Library. For a developer overview of apps for SharePoint, see App-scoped external content types in SharePoint 2013
SharePoint 2013 includes enhancements to external lists that bring them to functional parity with other SharePoint lists.
SharePoint 2013 introduces a number of improvements for external lists. These improvements reduce the load on the database servers in the SharePoint farm and increase the speed of list rendering. Performance is enhanced by having the external system do paging, filtering, and sorting of the external list data before it is sent to SharePoint.
When a limit filter is defined for a BDC model, users can specify the number of records in the list that they want displayed per page.
Users can use a drop-down list on a column in an external list to filter queries. Developers can prepare Collaborative Application Markup Language (CAML) queries or calls to the SPList object model to filter a list. In SharePoint 2013, if a data source filter is defined in the BDC model, the filtering occurs on the external system before it is passed to SharePoint.
In SharePoint 2013, the user’s request to sort an external list is sent to the external system. The external system sorts the data, and then sends it to the external list. To do this, the solution developer adds a sort filter to the BDC model for each column in the external list that the developer wants users to be able to sort. Sorting is applied on the entire dataset in the external system, instead of just the first set of data retrieved. The result is an accurately sorted list that is displayed to the user. For more information about paging, filtering, and sorting external lists, see “Enhanced Filtering, Sorting and paging for external lists” in What’s new in Business Connectivity Services for developers in the MSDN Library.
In SharePoint 2013, you can export an external list to Excel 2010 or to Excel 2013. This works much like exporting SharePoint native lists to Excel in SharePoint Server 2010. However, there are some differences in how you control what gets exported and how you work with the exported data. By default, exporting external lists is enabled. However, an administrator can disable this.
When you export an external list to Excel, you basically get the list as it is displayed in the browser. You get only the data that is present in the selected view and the rows and columns in Excel will have the same sorting and filtering applied as the external list. The column names in the exported data will have the same language settings as the external list and the exported data is subject to any filters that are on the external system.
The process of exporting data creates a one-way (external list to Excel) link between the external list and the Excel version of the list. The Excel version can be refreshed at any time to reflect the current state of the source external list. This means that any changes users might have made to the Excel version are overwritten. Changes that are made in the Excel version are never pushed back up to the source external list.
All Office 365 for enterprises subscriptions include SharePoint Online. This version of SharePoint Online introduces Business Connectivity Services to the Office 365 users. By using this version, you will be able to bring external data into SharePoint Online from cloud-based data sources and from data sources that are behind your company’s firewall in a hybrid scenario. Microsoft Business Connectivity Services can consume data sources that are exposed as WCF services, SQL Azure data services, OData endpoints, and web services.
In SharePoint 2013, Business Connectivity Services exposes the Representational State Transfer (REST) APIs for web and mobile app developers to use. These APIs provide a standard interface to the developers.
Business Connectivity Services Client Runtime now supports side-by-side installation of Office 2010 and Office 2013 on the same client computer. For example, if Outlook 2010 and Lync 2013 are installed on the same client computer, by default both versions of Business Connectivity Services Client Runtime are also installed. This new feature enables Office 2010 and Office 2013 to continue to work without causing conflicts or failures when Microsoft Business Connectivity Services Client Runtime is used.
SharePoint 2013 includes the following six new Windows PowerShell cmdlets specifically for OData.
Get-SPODataConnectionSetting Reads a Business Connectivity Services connection of a BDC service application and returns the Business Connectivity Services connection object.
Get-SPODataConnectionSettingMetadata Returns Business Connectivity Services connection metadata properties.
New-SPODataConnectionSetting Creates a new Business Data Connectivity connection.
Remove-SPODataConnectionSetting Deletes the Business Connectivity Services connection object together with its metadata object.
Set-SPODataConnectionSetting Can be used to edit the properties of an existing Business Connectivity Services connection.
Set-SPODataConnectionSettingMetadata Can be used to edit metadata properties of an existing Business Connectivity Services connection.
For developer-focused information about what’s new in Business Connectivity Services, see What’s new in Business Connectivity Services for developers in the MSDN Library.