How to: Add an Association between Two Database Table-Based External Content Types

Applies to: SharePoint Server 2010

In this walkthrough, let’s look at creating an association between Contacts and Orders in the Northwind database. CustomerID is a common identifier that relates both customers and orders in the database. This topic assumes that you have already created both the external content types and defined the basic operations.

Adding an Association Operation

  1. To create the association, in the External Content Types page in SharePoint Designer, double-click the Order external content type.

  2. On the Ribbon, click Operations Design View.

  3. In the Data Source Explorer, locate the Orders table. Right-click, and then select New Association. This creates an Association method instance on the Order external content type.

  4. In the Association Properties dialog box, click the Browse button as shown below.

    Browse related external content types

    Then select the related external content type as Customer. Notice that automatically the common identifier linking the two external content types is displayed. Click Next.

  5. In the Input Parameters Configuration dialog box, select the CustomerID and click Map to Identifier as shown in the figure below. Then click Next, and then click Next again.

    Map input parameter to identifier

  6. Click Next, and then click Finish. This creates an operation named OrdersNavigateAssociation.

  7. Save the external content type, and then generate the external lists for both external content types. Now, from the external list, you can connect to Microsoft Outlook and/or Microsoft SharePoint Workspace.

  8. You will automatically see an external content type instance picker next to each customer in the Order forms in SharePoint, Outlook and SharePoint Workspace.