Wednesday, March 05, 2008

A Possible Workaround with Content Types incorporating BDC lookups

I attended the session 'Creating Solutions with the Business Data Catalog' today at the SharePoint Conference, presented by Todd Baginski. At the end of the session, I had an idea on how to get around this limitation with Content Types (i.e. that you can add a BDC column to a Content Type). When question time came, I stood up and asked Todd whether my theory might work. He thought it was a very good idea.
So what is the idea? Well, basically it is quite a simple process to query the values in the BDC. You just need to know the the SSP name (e.g. SharedServices1), the LobSystemInstanceName (which appears in the Application Definition XML file) and the Entity that you want to query (e.g. Customers). Todd said that he will soon upload this sample code to his blog (I'm not much of a developer any more). You then take this sample code and wrap it in a custom Field Control. The User Experience will be that when you select that you want to create a field of type BDC, you select your custom type, then provide the 3 parameters required (or even a 4th to provide filtering). At runtime, the field control queries the BDC and returns the values in a drop down list. Under the covers, you could even store the associated ID of the selected BDC item. This could (potentially) be used for communicating with other BDC web parts (e.g. BDC Item web part), or could be consumed by other field controls that provide filtering capability (say to a duplicate field control that perhaps takes a 4th parameter to filter the BDC results). If you are a brave enough developer, give it a go and let me know how you go (I wouldn't mind a copy of the code).

2 comments:

Unknown said...

check my blog maybe you find it usefull

Unknown said...

http://hrvojekusanic.blog.com/EntityEditorWithPicker/