Folders and Nested Folders in ListInstances

This took me about 3 hours to figure out so I figure it was worth sharing.

First, I assumed that it was possible given that the .stp file export of a custom list with folders and nested folders seem to work fine.  Online, the feedback seems to be a bit different and my early results seemed to confirm it.  However, I persisted and after several (and I mean several) tries, I finally got it working.

So I share with you the magic sauce for those times when you want to seed your deployment with hierarchical data.

Yes, it was a pretty painful experience to get this figured out, but it was definitely worth it.

You may also like...

2 Responses

  1. clew says:

    You can export all this stuff using Designer without “pretty painful experience”.

    • Charles Chen says:

      Possibly, but for product development, it’s a different story.

      I would want to be able to take an extract from an existing system, for example, and transform it into the right XML to automatically populate the list on deployment without having to fuss around with an intermediate step of putting it into a SharePoint list an exporting it first.

      I should note that I started by exporting it to a template first and the format that it was in was not compatible with the ListInstance schema. In other words, if I copied the XML from the template, it would not work.