Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have come across blogs about how to setup an external content type. For example:

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?

share|improve this question
1  
The solutions suggested below are great for adding the picker when Viewing or Editing a single item. I was wondering if there's any way to change the Read List view (of all items) to show the foreign key Value instead of the ID? (e.g. instead of 5 it shows Healthcare in the list view) –  Sean Regan Sep 6 '11 at 22:18
add comment

5 Answers

I have written this blog post which shows how to do what you are after:

In Visual Studio

http://www.lightningtools.com/blog/archive/2011/01/10/sharepoint-external-listndash-using-the-picker-for-foreign-keys.aspx

In SharePoint Designer

http://lightningtools.com/bcs/lookup-foreign-key-values-in-external-lists/

Also make sure you set the 'Title' column for the foreign Entity

share|improve this answer
1  
No, these do not answer the OP's question. Your posts never show or discuss what happens in the list view, only the forms. In fact using your proposals the list views only would show the numeric, non-useful foreign key. –  Derek Gusoff May 24 '12 at 14:19
    
somehow your links point to the same url... –  AGuyCalledGerald Nov 1 '12 at 11:56
    
Good spot - I have updated it now –  Phill Duffy Nov 2 '12 at 9:15
add comment

you'll have to you use custom controls. Bind this control to the lookup column. I've tried this but didn't get much out of it. Was stuck in the end.

Here is how it could be achieved.

custom control issue

share|improve this answer
add comment

Try creating association. But they won't create a drop down control

share|improve this answer
add comment

The easiest OOTB way I was able to find is to customize the list form with InfoPath as described in this blog post by Clayton Cobb.

share|improve this answer
add comment

You can do it by building your content type on top of a Stored procedure or WCF.

share|improve this answer
1  
While this post may answer the question, we prefer more details such as "why". Please edit your post with additional details. See answer for general guidelines. –  SPDoctor May 25 '12 at 16:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.