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.
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
Open the Microsoft Office SharePoint Server 2007 page where you want to add the Web Part.
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.
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:
Click Add a Web Part in the zone in which you want to display the Web Part.
In the Add Web Parts - Web Page dialog box, select Business Data List Web Part, and then click Add.
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.)
In the tool pane, click Browse and choose Customer (AdventureWorksSample). Click OK.
Expand the Appearance section.
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.
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.
Select Business Data Related List Web Part, and then click Add.
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.)
Click Browse, and then select SalesOrder (AdventureWorksSample). Click OK. From the Relationship drop-down list, selectCustomerToSalesOrder.
Expand the Appearance section of the tool pane, and change the Title property to Sales Orders for Customer. Click OK.
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:
Click Get Related Item From.
Click Customers from AdventureWorks. The Web Parts are now connected.
On the menu bar in the chrome of the page, click Check In to Share Draft.
Select the Name filter from the first drop-down list in the Business Data List Web Part,.
From the next drop-down list, choose starts with, and type john in the adjacent field.
Click Retrieve Data to display all the customers in the AdventureWorks2000 database whose names start with "John".
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).