Tuesday, April 14, 2009

Custom SQL Lookup Field in WSS 3.0

This is a question I get asked a lot! How to create your own version of the BDC Lookup for either WSS or MOSS. The answer is not simple. Nono. But not impossible either.
You need to create your own custom field that uses the Entity Picker to populate a list of records and allows you to pick one. There is a lot of CAML, XML, Classes, Events and Code to deal with.
Following is sample code to create just that based on another SharePoint list. Simply plug your own DAL instead of the SPQuery and you're up and running.
http://code.msdn.microsoft.com/WSS3EntityPicker

Step by step instructions:
http://msdn.microsoft.com/en-us/library/cc889345.aspx

No comments: