How to: Create an app-scoped external content type in SharePoint 2013

SharePoint 2013

Learn how to create external content types that can be installed, secured, and used in an app for SharePoint.

Last modified: July 01, 2013

Applies to: SharePoint Server 2013

To get started developing app-scoped external content types, you need the following:

  • SharePoint 2013

  • Visual Studio 2012

  • Office Developer Tools for Visual Studio 2012

  • A published OData service available through the Internet

For information about setting up a SharePoint development environment, see Start: Set up the development environment for SharePoint 2013.

The following steps show how to create an external content type based on an Open Data protocol (OData) source, and how to modify it to be scoped to your app for SharePoint.

To create a new app for SharePoint

  1. Open Visual Studio 2012.

  2. Create an App for SharePoint 2013 project.

  3. Specify the app settings, including app name, the site URL for debugging the app, and how you would like to host the app (Autohosted, Provider-hosted, or SharePoint-hosted). For more information, see Choose patterns for developing and hosting your app for SharePoint.

  4. Choose Finish to create the app.

For complete steps for creating apps for SharePoint, see the following:

To generate the external content type

  1. In Solution Explorer, open the shortcut menu for the project, and choose Add, Content types for External Data source.

    This starts a wizard that helps you find the selected data source and create the BDC model.

  2. On the Set OData Source page, enter the URL of the OData service that you want to connect to. The URL should look something like this: http://services.odata.org/Northwind/Northwind.svc/.

    Specify a name for your OData source.

    Note Note

    For this example, you will use the Northwind service that is available from the producers list located on the Open Data Protocol website.

  3. A list appears showing data entities that are being exposed by the OData Service. Select one or more of the entities, and choose Finish.

To deploy the app-scoped external content type

  • Press F5 to compile the project and upload the project files to SharePoint.

Show:
© 2014 Microsoft