Manage external content types (SharePoint Server 2010)

 

Applies to: SharePoint Server 2010, SharePoint Foundation 2010

**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.

  • Use the external content type designer in Microsoft Visual Studio 2010.

    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.

In this article:

  • Set permissions on an external content type

  • View all external content types for an instance of a Business Data Connectivity service application

  • View all external content types contained in a model

  • View details of an external content type

  • Delete an external content type

  • Add an action to an external content type

  • Specify the profile page host for a Business Data Connectivity service application instance

  • Create or update a profile page for an external content type

Set permissions on an external content type

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

  1. 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.

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

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

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

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

  6. In the Permissions group, click Set Object Permissions.

  7. 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.

  8. 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.

      securitySecurity 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.

  9. 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.

View all external content types for an instance of a Business Data Connectivity service application

You can use commands in the View group of the ribbon to view all external content types in the Business Data Connectivity service application.

To view all external content types for an instance of a Business Data Connectivity service application

  1. Verify that you have the following administrative credentials:

    • You must be a farm administrator or an administrator of the service application.
  2. On the Central Administration Web site, in the Application Management section, click Manage service applications.

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

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

View all external content types contained in a model

View all external content types in a model to learn more about the model, or to select an external content type for other operations.

To view all external content types contained in a model

  1. Verify that you have the following administrative credentials:

    • You must be a farm administrator or an administrator of the service application.
  2. On the Central Administration Web site, in the Application Management section, click Manage service applications.

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

  4. In View group of the ribbon, click BDC Models.

  5. Point to the BDC model, click the arrow that appears, and then click View External Content Types.

View details of an external content type

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

  1. Verify that you have the following administrative credentials:

    • You must be a farm administrator or an administrator of the service application.
  2. On the Central Administration Web site, in the Application Management section, click Manage service applications.

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

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

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

Delete an external content type

Delete an external content type to remove it from the metadata store. If there are multiple versions of an external content type, deleting the external content type will delete all versions.

To delete an external content type

  1. 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 Edit permission on the external content type.

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

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

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

  5. Select each external content type to delete.

  6. On the Edit tab, in the Manage group, click Delete.

Add an action to an 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

  1. Verify that you have the following administrative credentials:

    • You must be a farm administrator or an administrator of the service application.
  2. On the Central Administration Web site, in the Application Management section, click Manage service applications.

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

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

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

  6. 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.

  7. 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”:

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

    Warning

    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.

  8. 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.

  9. 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.

  10. 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.

  11. 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.

  12. Click OK to add the action.

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

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

  1. Verify that you have the following administrative credentials:

    • You must be a farm administrator or an administrator of the service application.
  2. On the Central Administration Web site, in the Application Management section, click Manage service applications.

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

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

  5. 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.

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

  7. Click OK.

Create or update a profile page for an external content type

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.

Warning

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

  1. Verify that you have the following administrative credentials:

    • You must be a farm administrator or an administrator of the service application.
  2. On the Central Administration Web site, in the Application Management section, click Manage service applications.

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

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

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

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

  7. 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.

See Also

Other Resources

Resource Center: Operations and Manageability for SharePoint Server 2010 (https://go.microsoft.com/fwlink/p/?LinkId=220215)
Resource Center: Business Connectivity Services in SharePoint Server 2010 (https://go.microsoft.com/fwlink/p/?LinkId=220222)