Setting the right value of the FeatureId attribute for ListInstance


Setting the correct value for the FeatureId attribute of the ListInstance element is just one of things you can easily overlook on a sunny Friday afternoon when your mind is already enjoying the weekend. It’s like forgetting to read the small letters underneath a contract you’re about to sign: it seems like it all is going to be okay but at the end of the day you’ll be in troubles.

When provisioning list instances using Features you must provide the ID of the Feature associated with the particular list definition. Using the FeatureId attribute you are supposed to provide the ID of the Feature which contains the List Definition. In other words: if you’re provisioning an instance of a custom list the FeatureId attribute should be set to {00bfea71-de22-43b2-a848-c05709900100}. If you provide anything else as the value, you will get the strangest errors and you will spend hours debugging the whole problem.

Lesson learned.

Technorati Tags: SharePoint, SharePoint 2007, MOSS 2007, WSS 3.0

Others found also helpful: