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:

Libraries

  • Document Library
    • FeatureId={00bfea71-e717-4e80-aa17-d0c71b360101}
    • ListTemplate=101
  • Form Library
    • FeatureId={00bfea71-1e1d-4562-b56a-f05371bb0115}
    • ListTemplate=115
  • Wiki Page Library
    • FeatureId={00bfea71-c796-4402-9f2f-0eb9a6e71b18}
    • ListTemplate=119
  • Picture Library
    • FeatureId={00bfea71-52d4-45b3-b544-b1c71b620109}
    • ListTemplate=109
  • Report Library
    • FeatureId={2510d73f-7109-4ccc-8a1c-314894deeb3a}
    • ListTemplate=433
  • Translation Management Library
    • FeatureId={29d85c25-170c-4df9-a641-12db0b9d4130}
    • ListTemplate=1300
  • Data Connection Library
    • FeatureId={00bfea71-dbd7-4f72-b8cb-da7ac0440130}
    • ListTemplate=130
  • Slide Library
    • FeatureId={0be49fe9-9bc9-409d-abf9-702753bd878d}
    • ListTemplate=2100

Communications
  • Announcements
    • FeatureId={00bfea71-d1ce-42de-9c63-a44004ce0104}
    • ListTemplate=104
  • Contacts
    • FeatureId={00bfea71-7e6d-4186-9ba8-c047ac750105}
    • ListTemplate=105
  • Discussion Board
    • FeatureId={00bfea71-6a49-43fa-b535-d15c05500108}
    • ListTemplate=108
Tracking
  • Links
    • FeatureId={00bfea71-2062-426c-90bf-714c59600103}
    • ListTemplate=103
  • Calendar
    • FeatureId={00bfea71-ec85-4903-972d-ebe475780106}
    • ListTemplate=106
  • Tasks
    • FeatureId={00bfea71-a83e-497e-9ba0-7a5c597d0107}
    • ListTemplate=107
  • Project Tasks
    • FeatureId={00bfea71-513d-4ca0-96c2-6a47775c0119}
    • ListTemplate=150
  • Issue Tracking
    • FeatureId={00bfea71-5932-4f9c-ad71-1557e5751100}
    • ListTemplate=1100
  • Survey
    • FeatureId={00bfea71-eb8a-40b1-80c7-506be7590102}
    • ListTemplate=102
Custom Lists
  • Tabs List - ?
  • Custom List
    • FeatureId={00bfea71-de22-43b2-a848-c05709900100}
    • ListTemplate=100
  • Custom List in Datasheet View
    • FeatureId={00bfea71-3a1d-41d3-a0ee-651d11570120}
    • ListTemplate=120
  • Languages and Translators
    • FeatureId={29d85c25-170c-4df9-a641-12db0b9d4130}
    • ListTemplate=1301
  • KPI List
    • FeatureId={065c78be-5231-477e-a972-14177cc5b3c7}
    • ListTemplate=432
  • Import Spreadsheet - N/A

Web Pages - N/A

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.