How to: Test a Business Data Association

The Business Data Related List Web Part displays a list of related entity instances from a business application that is registered in the Business Data Catalog. This example shows you how to use a Business Data Related List Web Part to display the sales orders for a particular customer from the AdventureWorks2000 database.

Note

This procedure does not involve writing code; however, before using the procedure, register the AdventureWorks SQL Server 2000 Sample in the Business Data Catalog.

To add a Business Data Association Web Part

  1. Open the Microsoft Office SharePoint Server 2007 page where you want to add the Web Part.

  2. On the Site Actions menu, click Edit Page. The Site Actions menu is located on the upper right side of the page, below the Advanced Search link.

  3. To test associations, you must create a Business Data List Web Part that displays the Customer entity. To create the Business Data List Web Part, follow these steps:

    1. Click Add a Web Part in the zone in which you want to display the Web Part.

    2. In the Add Web Parts - Web Page dialog box, select Business Data List Web Part, and then click Add.

    3. In the Business Data List Web Part that is added, click Open the tool pane. (If you are prompted to click OK to navigate away from the current page, do so. Otherwise, proceed to the next step.)

    4. In the tool pane, click Browse and choose Customer (AdventureWorksSample). Click OK.

    5. Expand the Appearance section.

    6. In Title, replace Business Data List with Customers from AdventureWorks, and then click OK.

      You have created a Business Data List Web Part that can display customers from the AdventureWorks 2000 SQL Server database.

  4. Add an Association Web Part. To do this, click Add a Web Part in the zone in which you want to display the Web Part.

  5. Select Business Data Related List Web Part, and then click Add.

  6. In the Web Part named Business Data Related List, click Open the tool pane. (If you are prompted to click OK to navigate away from the current page, do so. Otherwise, proceed to the next step.)

  7. Click Browse, and then select SalesOrder (AdventureWorksSample). Click OK. From the Relationship drop-down list, selectCustomerToSalesOrder.

  8. Expand the Appearance section of the tool pane, and change the Title property to Sales Orders for Customer. Click OK.

  9. In the upper-right corner of the Sales Orders for CustomerWeb Part, click the down arrow to open the edit menu. On the menu, do the following:

    1. Click Connections.

    2. Click Get Related Item From.

    3. Click Customers from AdventureWorks. The Web Parts are now connected.

  10. On the menu bar in the chrome of the page, click Check In to Share Draft.

  11. Select the Name filter from the first drop-down list in the Business Data List Web Part,.

  12. From the next drop-down list, choose starts with, and type john in the adjacent field.

  13. Click Retrieve Data to display all the customers in the AdventureWorks2000 database whose names start with "John".

  14. Click the Select link beside any customer name in the Customers Web Part. Notice that the sales orders for that customer are displayed in the Business Data Related List Web Part (named Sales Orders for Customer).