Home » SharepointRSS

Feature Install/Activation not creating List Instance

I have created a feature that includes a form template, two list templates (one for a doc library that uses the form and another for a custom task list template), and two list instances.  The idea is that I want installation/activation of the feature to create and register the form template, to set up the two list templates, and then to create an instance of each list template (i.e. a Doc Library and a Task List based on my templates).

The feature installs fine, and all templates are created.  However, no instances are created.  Best I can tell I have the required XML files set up as required.  There are no errors that I've been able to isolate in the SharePoint logs.

Anyone have any ideas why I might not be getting the list instances?  Below are my XMLs...

FEATURE.XML:

<?xmlversion="1.0"encoding="utf-8"?><Featurexmlns="http://schemas.microsoft.com/sharepoint/"Id="{25F5615F-B338-48ff-8EB7-2BA05DD9972C}"Title="CAPEX Request"Description="CAPital EXpenditure Request"Version="12.0.0.1"Scope="Site"DefaultResourceFile="ipfscore"ReceiverClass="Microsoft.Office.InfoPath.Server.Administration.XsnFeatureReceiver"ReceiverAssembly="Microsoft.Office.InfoPath.Server, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"><ActivationDependencies><ActivationDependencyFeatureId="C88C4FF1-DBF5-4649-AD9F-C6C426EBCBF5"/></ActivationDependencies><ElementManifests><ElementManifestLocation="element.xml"/><ElementFileLocation="CAPEX Request.xsn"/><ElementFileLocation="CAPEX Request.dll"/><ElementFileLocation="CAPEX\schema.xml"/><ElementFileLocation="CAPEX\DispForm.aspx"/><ElementFileLocation="CAPEX\EditForm.aspx"/><ElementFileLocation="CAPEX\Upload.aspx"/><ElementFileLocation="CAPEX\AllItems.aspx"/><ElementFileLocation="CAPEX\WebFldr.aspx"/><ElementFileLocation="CAPEX\Combine.aspx"/><ElementFileLocation="CAPEX\MyItems.aspx"/><ElementFileLocation="CAPEX\repair.aspx"/><ElementFileLocation="CAPEX\my-sub.aspx"/><ElementFileLocation="CAPEX\mod-view.aspx"/><ElementFileLocation="CAPEX\template.xml"/><ElementFileLocation="PendingCAPEXRequests\schema.xml"/><ElementFileLocation="PendingCAPEXRequests\DispForm.aspx"/><ElementFileLocation="PendingCAPEXRequests\EditForm.aspx"/><ElementFileLocation="PendingCAPEXRequests\NewForm.aspx"/><ElementFileLocation="PendingCAPEXRequests\AllItems.aspx"/><ElementFileLocation="PendingCAPEXRequests\MyItems.aspx"/><ElementFileLocation="PendingCAPEXRequests\duetoday.aspx"/><ElementFileLocation="PendingCAPEXRequests\active.aspx"/><ElementFileLocation="PendingCAPEXRequests\byowner.aspx"/><ElementFileLocation="PendingCAPEXRequests\MyGrTsks.aspx"/></ElementManifests><Properties><PropertyKey="FeatureName"Value="CAPital EXpenditure Request"/><PropertyKey="OriginalFileName"Value="CAPEX Request.xsn"/><PropertyKey="RegisterForms"Value="*.xsn"/></Properties></Feature>

ELEMENT.XML:

<?xmlversion="1.0"encoding="utf-8"?><Elementsxmlns="http://schemas.microsoft.com/sharepoint/"><ModuleName="XSN"Url="FormServerTemplates"RootWebOnly="TRUE"><FileUrl="CAPEX Request.xsn"Name="CAPEX Request.xsn"Type="GhostableInLibrary"/></Module><ListTemplateAllowDeletion="True"AllowEveryoneViewItems="False"BaseType="1"DisplayName="CAPEX Requests"Description="CAPital EXpenditure Requests"EnableModeration="True"Hidden="False"OnQuickLaunch="True"Name="CAPEX"Type="10011"SecurityBits="22"Sequence="110"DocumentTemplate="101"VersioningEnabled="False"/><ListTemplateAllowDeletion="True"AllowEveryoneViewItems="False"BaseType="0"DisplayName="Pending CAPEX Requests"Description="In-Progress CAPital EXPenditure Requests"EnableModeration="False"Hidden="False"OnQuickLaunch="True"Name="PendingCAPEXRequests"Type="10071"SecurityBits="22"Sequence="110"DocumentTemplate="107"VersioningEnabled="False"/><ListInstanceId="10034"TemplateType="10011"Title="CAPEX Requests"OnQuickLaunch="TRUE"Url="fin/Lists/CAPEX"/><ListInstanceId="10035"TemplateType="10071"Title="Pending CAPEX Requests"OnQuickLaunch="TRUE"Url="fin/Lists/PendingCAPEXRequests"/></Elements>

 

 

 

 

2 Answers Found

 

Answer 1

I can't tell without knowing more, but are your Url attributes correct on your ListInstance elements?  Perhaps remove the "fin/"?
 

Answer 2

I tried

fin/Lists/CAPEX

/CAPEX

fin/Lists

None of them worked.  The templates do show up under  PrimarySite > Finance > Create (which maps to http://dmsharept/fin/_layouts/create.aspx), and I want the libraries to show up under http://dmsharept/fin/Lists/<LibraryName>

As I said, the templates do install properly it seems and I can manually create the library -- but I was expecting for the Feature Activation to create the libraries for me (at least that is how I understood the ListInstance element worked....or am I missing something?).

Thanks

 
 
 

<< Previous      Next >>


Microsoft   |   Windows   |   Visual Studio   |   Follow us on Twitter