|
1 |
| ---- |
2 |
| -title: Create an add-in-scoped external content type in SharePoint |
3 |
| -ms.date: 09/25/2017 |
4 |
| -ms.prod: sharepoint |
5 |
| -ms.assetid: de4b50a3-84da-48ce-9ba0-fe06571e52a8 |
6 |
| -localization_priority: Normal |
7 |
| ---- |
8 |
| - |
9 |
| - |
10 |
| -# Create an add-in-scoped external content type in SharePoint |
11 |
| - |
12 |
| -Learn how to create external content types that can be installed, secured, and used in an SharePoint Add-in. |
13 |
| - |
14 |
| -## Prerequisites for developing add-in-scoped external content types |
15 |
| -<a name="bkmk_Prerequisites"> </a> |
16 |
| - |
17 |
| -To get started developing add-in-scoped external content types, you need the following: |
18 |
| - |
19 |
| - |
20 |
| - |
21 |
| - |
22 |
| -- SharePoint |
23 |
| - |
24 |
| - |
25 |
| -- Visual Studio 2012 |
26 |
| - |
27 |
| - |
28 |
| -- Office Developer Tools for Visual Studio 2012 |
29 |
| - |
30 |
| - |
31 |
| -- A published OData service available through the Internet |
32 |
| - |
33 |
| - |
34 |
| -For information about setting up a SharePoint development environment, see [Set up a general development environment for SharePoint](set-up-a-general-development-environment-for-sharepoint.md). |
35 |
| - |
36 |
| - |
37 |
| - |
38 |
| - |
39 |
| -## Create an add-in-scoped external content type |
40 |
| -<a name="bkmk_CreateECT"> </a> |
41 |
| - |
42 |
| -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 SharePoint Add-in. |
43 |
| - |
44 |
| - |
45 |
| - |
46 |
| - |
47 |
| -### To create a new SharePoint Add-in |
48 |
| - |
49 |
| - |
50 |
| -1. Open Visual Studio 2012. |
51 |
| - |
52 |
| - |
53 |
| -2. Create an **Add-in for SharePoint** project. |
54 |
| - |
55 |
| - |
56 |
| -3. Specify the add-in settings, including add-in name, the site URL for debugging the add-in, and how you would like to host the add-in (Autohosted, Provider-hosted, or SharePoint-hosted). For more information, see [Choose patterns for developing and hosting your SharePoint Add-in](http://msdn.microsoft.com/library/05ce5435-0a03-4ddc-976b-c33b08d03457%28Office.15%29.aspx). |
57 |
| - |
58 |
| - |
59 |
| -4. Choose **Finish** to create the app. |
60 |
| - |
61 |
| - |
62 |
| -For complete steps for creating SharePoint Add-ins, see the following: |
63 |
| - |
64 |
| - |
65 |
| - |
66 |
| - |
67 |
| -- [Get started creating provider-hosted SharePoint Add-ins](http://msdn.microsoft.com/library/3038dd73-41ee-436f-8c78-ef8e6869bf7b%28Office.15%29.aspx) |
68 |
| - |
69 |
| - |
70 |
| -- [How to: Create a basic autohosted app for SharePoint](http://msdn.microsoft.com/library/0572894d-c437-4b7d-8ac6-8405496e2145%28Office.15%29.aspx) |
71 |
| - |
72 |
| - |
73 |
| -- [Get started creating SharePoint-hosted SharePoint Add-ins](http://msdn.microsoft.com/library/1b992485-6efe-4ea4-a18c-221689b0b66f%28Office.15%29.aspx) |
74 |
| - |
75 |
| - |
76 |
| - |
77 |
| -### To generate the external content type |
78 |
| - |
79 |
| - |
80 |
| -1. In **Solution Explorer**, open the shortcut menu for the project, and choose **Add**, **Content types for External Data source**. |
81 |
| - |
82 |
| - This starts a wizard that helps you find the selected data source and create the BDC model. |
83 |
| - |
84 |
| - |
85 |
| -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/`. |
86 |
| - |
87 |
| - Specify a name for your OData source. |
88 |
| - |
89 |
| - > [!NOTE] |
90 |
| - > For this example, you will use the Northwind service that is available from the producers list located on the [Open Data Protocol website](http://www.odata.org). |
91 |
| -
|
92 |
| -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**. |
93 |
| - |
94 |
| - |
95 |
| - |
96 |
| -### To deploy the add-in-scoped external content type |
97 |
| - |
98 |
| - |
99 |
| -- Press F5 to compile the project and upload the project files to SharePoint. |
100 |
| - |
101 |
| - |
102 |
| - |
103 |
| -## See also |
104 |
| -<a name="bk_addresources"> </a> |
105 |
| - |
106 |
| - |
107 |
| -- [Add-in-scoped external content types in SharePoint](add-in-scoped-external-content-types-in-sharepoint.md) |
108 |
| - |
109 |
| - |
110 |
| -- [Choose patterns for developing and hosting your SharePoint Add-in](http://msdn.microsoft.com/library/05ce5435-0a03-4ddc-976b-c33b08d03457%28Office.15%29.aspx) |
111 |
| - |
112 |
| - |
113 |
| -- [SharePoint Add-ins](http://msdn.microsoft.com/library/cd1eda9e-8e54-4223-93a9-a6ea0d18df70%28Office.15%29.aspx) |
114 |
| - |
115 |
| - |
116 |
| -- [External content types in SharePoint](external-content-types-in-sharepoint.md) |
117 |
| - |
118 |
| - |
119 |
| -- [Get started with Business Connectivity Services in SharePoint](get-started-with-business-connectivity-services-in-sharepoint.md) |
120 |
| - |
121 |
| - |
122 |
| -- [Business Connectivity Services in SharePoint](business-connectivity-services-in-sharepoint.md) |
123 |
| - |
124 |
| - |
125 |
| - |
| 1 | +--- |
| 2 | +title: Create an add-in-scoped external content type in SharePoint |
| 3 | +ms.date: 09/25/2017 |
| 4 | +ms.prod: sharepoint |
| 5 | +ms.assetid: de4b50a3-84da-48ce-9ba0-fe06571e52a8 |
| 6 | +localization_priority: Normal |
| 7 | +--- |
| 8 | + |
| 9 | + |
| 10 | +# Create an add-in-scoped external content type in SharePoint |
| 11 | + |
| 12 | +Learn how to create external content types that can be installed, secured, and used in an SharePoint Add-in. |
| 13 | + |
| 14 | +## Prerequisites for developing add-in-scoped external content types |
| 15 | +<a name="bkmk_Prerequisites"> </a> |
| 16 | + |
| 17 | +To get started developing add-in-scoped external content types, you need the following: |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | +- SharePoint |
| 23 | + |
| 24 | + |
| 25 | +- Visual Studio 2012 |
| 26 | + |
| 27 | + |
| 28 | +- Office Developer Tools for Visual Studio 2012 |
| 29 | + |
| 30 | + |
| 31 | +- A published OData service available through the Internet |
| 32 | + |
| 33 | + |
| 34 | +For information about setting up a SharePoint development environment, see [Set up a general development environment for SharePoint](set-up-a-general-development-environment-for-sharepoint.md). |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | +## Create an add-in-scoped external content type |
| 40 | +<a name="bkmk_CreateECT"> </a> |
| 41 | + |
| 42 | +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 SharePoint Add-in. |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | +### To create a new SharePoint Add-in |
| 48 | + |
| 49 | + |
| 50 | +1. Open Visual Studio 2012. |
| 51 | + |
| 52 | + |
| 53 | +2. Create an **Add-in for SharePoint** project. |
| 54 | + |
| 55 | + |
| 56 | +3. Specify the add-in settings, including add-in name, the site URL for debugging the add-in, and how you would like to host the add-in (Autohosted, Provider-hosted, or SharePoint-hosted). For more information, see [Choose patterns for developing and hosting your SharePoint Add-in](http://msdn.microsoft.com/library/05ce5435-0a03-4ddc-976b-c33b08d03457%28Office.15%29.aspx). |
| 57 | + |
| 58 | + |
| 59 | +4. Choose **Finish** to create the app. |
| 60 | + |
| 61 | + |
| 62 | +For complete steps for creating SharePoint Add-ins, see the following: |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | +- [Get started creating provider-hosted SharePoint Add-ins](http://msdn.microsoft.com/library/3038dd73-41ee-436f-8c78-ef8e6869bf7b%28Office.15%29.aspx) |
| 68 | + |
| 69 | + |
| 70 | +- [Get started creating SharePoint-hosted SharePoint Add-ins](http://msdn.microsoft.com/library/1b992485-6efe-4ea4-a18c-221689b0b66f%28Office.15%29.aspx) |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | +### To generate the external content type |
| 75 | + |
| 76 | + |
| 77 | +1. In **Solution Explorer**, open the shortcut menu for the project, and choose **Add**, **Content types for External Data source**. |
| 78 | + |
| 79 | + This starts a wizard that helps you find the selected data source and create the BDC model. |
| 80 | + |
| 81 | + |
| 82 | +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/`. |
| 83 | + |
| 84 | + Specify a name for your OData source. |
| 85 | + |
| 86 | + > [!NOTE] |
| 87 | + > For this example, you will use the Northwind service that is available from the producers list located on the [Open Data Protocol website](http://www.odata.org). |
| 88 | +
|
| 89 | +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**. |
| 90 | + |
| 91 | + |
| 92 | + |
| 93 | +### To deploy the add-in-scoped external content type |
| 94 | + |
| 95 | + |
| 96 | +- Press F5 to compile the project and upload the project files to SharePoint. |
| 97 | + |
| 98 | + |
| 99 | + |
| 100 | +## See also |
| 101 | +<a name="bk_addresources"> </a> |
| 102 | + |
| 103 | + |
| 104 | +- [Add-in-scoped external content types in SharePoint](add-in-scoped-external-content-types-in-sharepoint.md) |
| 105 | + |
| 106 | + |
| 107 | +- [Choose patterns for developing and hosting your SharePoint Add-in](http://msdn.microsoft.com/library/05ce5435-0a03-4ddc-976b-c33b08d03457%28Office.15%29.aspx) |
| 108 | + |
| 109 | + |
| 110 | +- [SharePoint Add-ins](http://msdn.microsoft.com/library/cd1eda9e-8e54-4223-93a9-a6ea0d18df70%28Office.15%29.aspx) |
| 111 | + |
| 112 | + |
| 113 | +- [External content types in SharePoint](external-content-types-in-sharepoint.md) |
| 114 | + |
| 115 | + |
| 116 | +- [Get started with Business Connectivity Services in SharePoint](get-started-with-business-connectivity-services-in-sharepoint.md) |
| 117 | + |
| 118 | + |
| 119 | +- [Business Connectivity Services in SharePoint](business-connectivity-services-in-sharepoint.md) |
| 120 | + |
| 121 | + |
| 122 | + |
| 123 | + |
0 commit comments