Monday, April 09, 2007

Sahil Malik has a great series of posts on the Business Data Catalog, including code samples and step-by-step tutorials. Check it out on his blog here.

Incidentally, if you haven't yet looked at his book "Pro ADO.Net 2.0", you may wish to pick up a copy. I bought one last year and have found it indispensable. It's easy to read and really gets into the details on not just the technical matters but the best practices and the issues you need to think about when working with data sources. I've already learned a lot from it.

One of the nice things about the Apress books is that they offer PDF versions as well, which is handy when you don't want to schlep dozens of hefty .NET books around.

Sunday, April 08, 2007

Feature IDs and Template Numbers For Lists and Libraries

Again, by way of Mick Badran, a helpful tip for when you need to find the GUID or Template number for a list (because you are developing features, or using the SharePoint object model perhaps). You can find the template number and Feature ID for any list type by clicking "Create" and looking at the browser status bar at the bottom. For your convenience I have a list of the common lists and libraries and their Feature ID and Template number:

Wednesday, April 04, 2007

If you're thinking of doing any Business Data Catalog work, do yourself an enormous favour and check out BDC Meta Man.Todd Baginski and Nick Swan have released this extremely useful GUI tool for quickly creating Business Data Catalog application schemas. I used Todd's earlier incarnation as the basis for an import of 10,000 Clarify CRM records . It simplified the process enormously, even in the early goings. Do yourself a favour and check out their work:http://www.bdcmetaman.com/default.aspx

This very helpful tip comes by way of Mick Badran at Breeze Training (http://www.breezetraining.com.au/site/), who incidentally puts on a first-class MOSS 2007 Boot Camp. One great thing about SharePoint is that it can help to free people from the whole file structure "folder paradigm". Instead of trying to remember which folder something is in, people should be able to upload documents, apply reasonable metadata, and find them again using searches and lookups. That's why I often try to disable Folder creation on document libraries in the portal.

Back in the real world, keeping folders is sometimes a necessary evil. Here is an approach that at leasts adds some Information Management best practices to the process.

If you want to apply metadata to folders in SharePoint 2007 document libraries, you can create a custom content type with custom columns on it. Simply create a new custom content type at the root of your site collection, and select "Folder Content Types" from the "Select parent content type from" dropdown box, and "Folder" from the "Parent Content Type" filtered list.

Then, add your custom columns to this content type. These will be the metadata fields that appear when a user creates a new metadata folder.

Go back to the Library settings, and select "Advanced Settings". Make sure you enable the "Manage content types" option. Also remove the ability to "Allow users to create new folders". This prevents them from adding generic folders and forces them to select your metadata-driven ones.

Now on the New dropdown on the library, users can select your "Metadata Folder". Doing so will prompt them to enter the metadata you have applied to it. Folder information will be displayed in the library views, although you may have to edit the current view and select the new columns for display. Of course results will also appear in the Search Results, once a crawl has been made.