Generating list instances XML using Imtech ListInstance Generator
This week I learned the hard way that the FeatureId attribute of the ListInstance element must contain the ID (GUID) of the Feature which has provisioned the particular List Definition. Although I’ve provisioned lists using Features dozens of times, this one sneaked up on me and took me more than an hour to figure out. To prevent it from happening ever again I’ve decided to create a tool which would make working with ListInstance element even easier.
Introducing Imtech ListInstance Generator
Provisioning a list instance using a Feature is not that difficult. Especially if you’re benefitting of intellisense for SharePoint XML the only things you have to figure out are the type of the List Definition you want to use as a template and the ID of the Feature which has provisioned that List Definition. One way of getting both values is to navigate to the ‘Create’ page (~Site/_layouts/create.aspx) and extract the properties from the link to the particular List Definition.
After a you get too confident: Custom List is 100, Document Library 101 but what about the FeatureId? ‘SharePoint probably wants to know the ID of this Feature so it can remove the list when I deactivate it’ – you might think. Wrong!
Using Imtech ListInstance Generator you’re not only sure that you’re using right properties but using it saves you time as well. Simply provide a URL to your site and hit ‘Open’ (1), pick a List Definition from the list (2), enter the details (3) and the Imtech ListInstance Generator will create the proper XML for you (4). You can either copy it to your existing file or save it (5).
As it’s 1.0 version, it hasn’t been tested with every possible scenario out there. If you experience any problems or have ideas of improving the tool, please let me know.
Imtech ListInstance Generator v22.214.171.124 is a free tool and you can use it without any restrictions.
Download: Imtech ListInstance Generator v126.96.36.199 (40KB)