Creating your association in BDC Meta Man

The Business Data Catalog is at displaying information that has a parent -> child relationship. It does this using the Business Data List and Business Data Related List Web Part. Of course you need to define in your application definition file how this association will work – but with BDC Meta Man that’s really easy.

Creating your association in BDC Meta Man

Open BDC Meta Man and choose to connect to a SQL Server data source. Expand the database you wish to work with so you can see the tables within it

create bdc entities from tables really easily

Drag and drop the table onto the design surface that will be the parent entity in your association

drag your business data catalog entities onto the design surface

We’ll set a title property for this entity so that we have a ‘View Profile’ action. To do this right click on the entity and choose ‘Edit Entity’ from the menu. On the first screen that shows up we can pick a Title field from the drop down list. Click on the Save button to save the entities new settings.

Now you can drag your second entity on to the design surface. This will be the child entity. As well as thinking of this relationship as a parent->child relationship in database terms it will be a one-to-many relationship.

create multiple entities in seconds

Now your two Business Data Catalog entities are on the design surface you can drag and drop between the fields that provide pimary key->foreign key functionality. Your design surface should like as below

connect the business data catalog entities to create an association

Set where you want your Business Data Catalog application definition file to be generated by using the main menu and clicking Configuration -> Settings and either entering a filename location in the Application Definition Filename textbox or use the Browse button.
Now you can generate your application definition file by clicking the play button in the top left of the application or choosing Build -> Generate Definition File, from the main menu.

Now import your Business Data Catalog application definition file into MOSS. The article just linked to explains how to do this.

Once your BDC definition file has been imported navigate to the SharePoint site where you want to display your business data using the Business Data Catalog Web Parts. Put the page into Edit mode and in the web part zone where you want to have the web parts click ‘Add a Web Part’. From the list of web parts you are presented with in the popup gallery select the Business Data List and Business Data Related List Web Parts and add them to your page. We then need to setup our web parts to use the correct Business Entities so click on the link you are presented with in each web part to configure them. In our example here the Business Data List web part should use the Employees entity, and the Business Data Related List web part should use the PhoneNumbers entity. You’ll also notice when you setup the Related List web part after picking the entity you get to choose which association method to use. In our example here we’ll only have a single association method but you have have more depending on how complex your entities and relationships become.

Once the web parts are configured with the correct Business Data Catalog entities you need to connect them both together, the image below shows how to do this very well.

connect the business data catalog web parts together

Once you connect the BDC web parts together the Business Data List web part will change slightly so each row of data now has a radio button to the left of it. This is so you can select a row of data, and all the related child rows will be displayed in the Business Data Related List web part below it.

select a row of data and the bdc related list web part with bring back associated data

Finally, the Title column that we selected for our Employee entity – if you hover over that column you’ll see an Edit-Control-Block drop down appear and clicking it brings up the link to the employee page.

click the BDC action

to display the BDC profile page