You may have seen this error when creating a custom list definition in Sharepoint.
Exception from HRESULT: 0x81070201
This error means that the custom list schema.xml cannot be found for one of a number of reasons.
- You didn't create a
schema.xml - It was not included as an
ElementFilenode in theElementManifestsnode of thefeature.xml - The
Nameattribute in theListTemplatenode must match the folder name that theschema.xmlis physically stored in.
The last point is the one that I got caught out on, and at first glance it seems to be an odd requirement. Put simply, the on list creation the list uses it's name attribute to look for the schema.xml. Because you may have multiple list templates in a single feature, there is no way for the list to use the ElementManifest to locate it's schema.
So your folder structure should look like:
- Feature
- FeatureName
- Feature.xml
- Elements.xml <- This contains the ListTemplate
- ListName
- schema.xml
- AllItems.aspx
- DispForm.aspx
- EditForm.aspx
- NewForm.aspx
Comments