1

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?

1
  • 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
    Commented Sep 6, 2011 at 22:18

6 Answers 6

2

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

3
  • 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. Commented May 24, 2012 at 14:19
  • somehow your links point to the same url... Commented Nov 1, 2012 at 11:56
  • Good spot - I have updated it now Commented Nov 2, 2012 at 9:15
0

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

0

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

0

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.

0

A good writeup of how to accomplish this can be found here: http://www.sandeepnakarmi.com/2014/09/create-external-lists-with-foreign-key-association-and-use-user-friendly-column-names/

-1

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

1
  • 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
    Commented May 25, 2012 at 16:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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