1
votes

I have come across blogs about how to setup an external content type (e.g. http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/02/02/it-s-easy-to-configure-an-external-list-with-business-connectivity-services-bcs-in-sharepoint-foundation-2010.aspx) but I have not seen any examples of what to do when your external SQL DB has foreign keys.

For example. I have a database that has orders and customers. An order has one and only one customer and a customer can have many orders. How can I setup external content types in such a way that when in the list view of these external content types, I can jump between and possible lookup values to that other type?

2

2 Answers

0
votes

You need to add the one-to-many or master-detail association between the Customers and Orders tables in sharepoint designer. These Links will help you:

http://msdn.microsoft.com/en-us/library/ff394528(v=office.14).aspx

http://msdn.microsoft.com/en-us/library/ee558417(v=office.14).aspx

I've tested that. My case was to use the sharepoint search to search for projects' attachments at external system. I had two tables Projects and Attachments with one-to-many relationship. I made two ECT for each of them with the association operation on the Attachments ECT.