Manage external content types (SharePoint Server 2010)

SharePoint 2010

Applies to: SharePoint Server 2010, SharePoint Foundation 2010

Topic Last Modified: 2012-01-18

Summary:Administrators of Business Data Connectivity service applications in Microsoft SharePoint Server 2010 can perform routine operations, such as modifying an application's permissions or adding more features, after an external content type is added to an application.

An external content type is an XML file that defines an object, such as “Customer,” “Order,” or “Contact,” that can be used in a business application. The definition can include the following information:

The fields of data that are contained in the object

The methods to create, read, update, query, or delete that object

Actions that users can take on the object

Information that supports connecting to the external data source that provides the object’s data

External content types define data that is stored in a supported external system, such as a SQL Server database or other relational database, a SharePoint site, a Web service, or a custom data connector.

An external content type can be added to the Business Data Connectivity service in the following ways:

Use Microsoft SharePoint Designer 2010 to create a new external content type.

The external content types can then be included in a solution package and deployed to the Business Data Connectivity service.

Import an application model into the Business Data Connectivity service application that contains one or more external content types.

The external content types are added to the Business Data Connectivity service application.

After an external content type is added to the Business Data Connectivity service application, administrators of that service application can modify its permissions, or add more features such as actions and profile pages.

You set permissions on an external content type to specify who can edit the content type, who can execute operations (such as read or update) on it, who can use it to create external lists, and who can set permission on it.

We recommend that you give specific permissions to each user or group that needs them, in such a way that the credentials provide the least privilege necessary to perform the needed tasks. For more information about setting permissions, see Business Connectivity Service permissions overview in "Business Connectivity Services security overview (SharePoint Server 2010)".

To set permissions on an external content type

Verify that you have one of the following administrative credentials:

You must be a farm administrator.

You must be an administrator of the Business Data Connectivity service application and have Set Permissions permission on the external content type.

On the Central Administration Web site, in the Application Management section, click Manage service applications.

Click in the Name column of the row that corresponds to the Business Data Connectivity service application.

In the View group of the ribbon, click External Content Types.

Click the check box of each external content type for which you want to set permissions.

In the Permissions group, click Set Object Permissions.

In the box, type the user accounts, groups, or claims for which permissions will be granted, and then click Add.

Note

The user account, group, or claim cannot have a vertical bar (|) in its name.

Set the permissions for the account, group, or claim:

Note

At least one user, group or claim in the metadata object's access control list must have the Set Permissions permission.

Click Edit to allow the user, group, or claim to edit the external content type.

Security Note

The Edit permission should be considered highly privileged. With the Edit permission a malicious user can steal credentials or corrupt a server farm. To help ensure a secure solution, we recommend using a test environment where the Edit permission can be assigned freely to developers and solution designers. When deploying the tested solution to a production environment, remove the Edit permissions.

Click Execute to allow the user, group, or claim to execute operations (create, read, update, delete, or query) on the external content type.

Click Selectable In Clients to allow the user, group, or claim to create external lists of the external content type and to view the external content type in the external item picker.

Click Set Permissions to allow the user, group, or claim to set permissions on the external content type.

The Set Permissions permission should be considered highly privileged. With the Set Permissions permission, a user can grant Edit permission to the external content type.

To propagate permissions to all methods nested in the external content type, click Propagate permissions to all methods of this external content type. Doing so will overwrite existing permissions.

You can view an external content type to learn about the external type, to view its fields, to view its relationship to other entities, and to view actions or filters that are associated with the external content type. You can view a list of all external content types for a Business Data Connectivity service application, or you can view only those entities that are associated with a particular model.

To view details of an external content type

Verify that you have the following administrative credentials:

You must be a farm administrator or an administrator of the service application.

On the Central Administration Web site, in the Application Management section, click Manage service applications.

Click in the Name column of the row that corresponds to the Business Data Connectivity service application.

In the View group of the ribbon, click External Content Types.

Point to the external content type that you want to view, click the arrow that appears, and then click View External Content Type.

You can add a custom action to an external content type. A custom action can be a program or Web page that is accessible by using its uniform resource locator (URL). When you associate an action with an external content type, you can pass parameters to that action based on the contents of one or more fields in the external content type. For example, you could associate a search page’s URL with an external content type and provide data from an item of that external content type to parameterize the search.

Note

When you add a new action to an external content type, that action will not be available in existing external lists of that external content type. Only new external lists of the appropriate external content type will display the action in the shortcut menu.

To add an action to an external content type

Verify that you have the following administrative credentials:

You must be a farm administrator or an administrator of the service application.

On the Central Administration Web site, in the Application Management section, click Manage service applications.

Click in the Name column of the row that corresponds to the Business Data Connectivity service application.

In the View group of the ribbon, click External Content Types.

Point to the external content type, click the arrow that appears, and then click Add Action.

On the Add Action page, in the Action Name box, type the name of the action.

This can be any text string. It is the command name that users will see in the shortcut menu when they point to an item of the external content type and click the arrow that appears.

In the Navigate to this URL field, type the full URL of the command that the user will browse to when he or she clicks the action.

A command can include parameters that will be populated with the contents of one or more fields in the external content type. In the URL that you type in this field, you can include placeholders for each parameter to use. Placeholders should be numbered with integers starting at zero (0, 1, 2, and so on) and should be of the form {number}. For example, the following sample URL provides two parameters, “p0” and “p1”:

http://www.adventure-works.com/sample.aspx?p0={0}&p1={1}

Caution

Parameters can contain personally identifying information such as names and Social Security numbers. When designing actions, be careful not to use fields that display such information inadvertently, or, if this is necessary, make sure that your Web servers use Secure Sockets Layer on all connection points.

If your action is available from within a Web Part, click Yes under Launch the action in a new Web browser window (applies to External Data Web Parts only) to have the action launch a new browser window. This will protect the user from losing the current context when using the action. To have the action occur in the current browser window, click No.

If your action includes parameters, in the Parameter Property field, for each parameter placeholder in your URL, starting with parameter {0}, click Add Parameter and, in the list of available fields in the external content type, click the field whose contents you want to pass for that parameter.

Repeat this step for each parameter in the URL of the command. You can remove any parameter by clicking the button labeled Remove next to the parameter.

To associate an icon with the custom action, in the Icon section, either click Standard icon and select an icon from the list or, in the The image at this URL field, type the full URL of an image to use as the action’s icon.

The default action is the action that occurs when the user clicks the item instead of picking an action from a menu. To make the action the default action, click Default Action.

A profile page displays the data for an item of an external content type. Profile pages for a Business Data Connectivity service application are stored in a site in the farm that hosts the Business Data Connectivity service. You can specify the site where profile pages are hosted.

To specify the profile page host for a Business Data Connectivity service application instance

Verify that you have the following administrative credentials:

You must be a farm administrator or an administrator of the service application.

On the Central Administration Web site, in the Application Management section, click Manage service applications.

Click in the Name column of the row that corresponds to the Business Data Connectivity service application.

In the Profile Pages group of the ribbon, click Configure.

On the Entity Profile Page Host page, in the Host SharePoint site URL field, specify the URL of a site where profile pages of external content types will be created and stored. This site must be in the same server farm as the Business Data Connectivity service application instance.

Important

The site where profile pages of an external content type are created and stored must grant design rights for anyone who creates or updates profile pages, and read-only permission for all end users who will view the profile pages. If you have to create this site in a new Web application, associate that Web application with the Business Data Connectivity service application.

To lock the site so that profile pages cannot be created, deselect Enable Profile Page Creation.

You can create a new profile page for an external content type or you can update an existing page. For example, when you add an external data column to or remove an external data column from an external content type, you could update the profile page to reflect the changes to the external content type.

Caution

Updating an existing profile page may overwrite the current profile page. Any customizations on the current page could be lost on the updated page.

To create or update a profile page for an external content type

Verify that you have the following administrative credentials:

You must be a farm administrator or an administrator of the service application.

On the Central Administration Web site, in the Application Management section, click Manage service applications.

Click in the Name column of the row that corresponds to the Business Data Connectivity service application.

In the View group of the ribbon, click External Content Types.

On the View External Content Types page, select the external content type for which you want to create or update a profile page.

Point to the external content type, click the arrow that appears, and then click Create/Upgrade Profile Page.

On the Create/Upgrade Profile Pages page, click OK.

Tip

To create or update multiple external content types’ profile pages, select a set of external content types, click the Edit tab, and in the Profile Pages group click Create/Upgrade.