Skip Ribbon Commands
Skip to main content
Cas | zevenseas | SharePoint Blog > Posts > Adding Lists Programmatically based on a custom ListTemplate
June 20
Adding Lists Programmatically based on a custom ListTemplate

When adding Lists programmatically, it's most likely we use the Lists.Add() Methods. These Methods are giving us choice on how to create the list. In my case I wanted to use a custom ListTemplate which is inside a custom Feature.

Feature Activation

First I chose to get my custom SPListTemplate from the Web and use the Add(String, String, SPListTemplate) Method. But I figured I had to activate the Feature that has the Template in it so I can retrieve it from the SPWeb. Now I didn't want to do that because there was a whole lot of templates and declarative lists inside I didn't want to use.
 

Solution

When I came across the last override of this Method Add(String, String, String, String, Int32, String, String, SPFeatureDefinition, SPListTemplate.QuickLaunchOptions). It didn't say anything about the Feature needed activation. I tried it and so it seemed. The List is Created based on the correct Template and the Feature that hosts the Template stays inactive.

Example

The call I now use to create my custom List is:

Guid discListId = web.Lists.Add(“My Discussions”, "Forum for community discussions", “Lists/Discussions”, "feature id as string", Template ID, "100");

Summary

While this is not a very common scenario, there might be some cases where you need just that ListTemplate from an installed Feature which you don’t want to activate for that Site(Collection). It’s good to know this way of adding a SPList programmatically give you the chance to do so.

Comments

Juicy Couture outlet


 Welcome to summer Juicy Couture outlet .Juicy Couture is a glamorous, irreverent, and fun lifestyle brand for the decidedly fashionable. Known for ascending the tracksuit to its status as a casual luxury icon, Juicy Couture continues to evolve, bringing the same confident, whimsical and feminine attitude to all its designs.Founded in 1997 by Pamela Skaist-Levy and Gela Nash Taylor, Juicy Couture was acquired by industry titan Liz Claiborne Inc.

read more:

http://www.jbagsoutletuk.org/
http://www.juicycoutureoutlethandbagss.com/
http://www.juicyandcoutureoutlet.com/
http://juicycouturediaperbagsale.blinkweb.com
http://juicycoutureoutlets.blinkweb.com
 on 8/29/2012 1:41 AM

abercrombie_milano

<a href="http://www.abercrombiemilanoofficial.net" title="outlet" ><strong>outlet</strong></a> Inoltre, la <a href="http://www.abercrombiemilanoofficial.net" title="abercrombie a milano Abercrombie" ><strong>abercrombie a milano Abercrombie</strong></a> and Fitch Save <a href="http://www.abercrombiemilanoofficial.net" title="abercrombie genova the Children" ><strong>abercrombie genova the Children</strong></a>  Charity anello esposto all'ingresso dello showroom ha attirato grande attenzione. Per celebrare il suo 125 ° anniversario, Abercrombie and Fitch <a href="http://www.abercrombiemilanoofficial.net" title="profumo abercrombie uomo ha" ><strong>profumo abercrombie uomo ha</strong></a> sostenuto  <a href="http://www.abercrombiemilanoofficial.net" title="la  abercrombie napoli grande" ><strong>la  abercrombie napoli grande</strong></a> educazione dei figli   <a href="http://www.abercrombiemilanoofficial.net" title="della carità  abercrombie online shop &quot;Future Change&quot; progetto" ><strong>della carità  abercrombie online shop &quot;Future Change&quot; progetto</strong></a>   avviato da "Save the Children" e ha creato questo anello d'argento per rendere omaggio alla Abercrombie and <a href="http://www.abercrombiemilanoofficial.net" title="abercrombie parigi" ><strong>abercrombie parigi</strong></a> Fitch, che era iniziato come un argentiere.  <a href="http://www.abercrombiemilanoofficial.net" title="L\&#39;anello  taglie abercrombie è inciso" ><strong>L\&#39;anello  taglie abercrombie è inciso</strong></a>  con <a href="http://www.abercrombiemilanoofficial.net" title="Abercrombie abercrombie a roma" ><strong>Abercrombie abercrombie a roma</strong></a> and Fitch e l'emblema di <a href="http://www.abercrombiemilanoofficial.net" title="abercrombie e fitch milano sito ufficiale Save the Children" ><strong>abercrombie e fitch milano sito ufficiale Save the Children</strong></a>   sull'anello esterno e all'interno monitorare rispettivamente. 20% del ricavato sarà devoluto a Save the Children. L'anello chiede per circa $ 400.<br />
<br />
La gente sarà sempre trovare il tempo per   <a href="http://www.abercrombiemilanosale.biz" title="cercare il  lavorare da abercrombie tipo" ><strong>cercare il  lavorare da abercrombie tipo</strong></a> di un pezzo cronometraggio adeguati alle loro esigenze e lo stile desiderato, che <a href="http://www.abercrombiemilanosale.biz" title="si abercrombie on line" ><strong>si abercrombie on line</strong></a> sentono sono confortevoli con indossare. Questo potrebbe <a href="http://www.abercrombiemilanosale.biz" title="abercombie essere un" ><strong>abercombie essere un</strong></a>  po <a href="http://www.abercrombiemilanosale.biz" title="profumo abercrombie uomo \&#39;un duro processo" ><strong>profumo abercrombie uomo \&#39;un duro processo</strong></a>   decisionale attività se avete appena  <a href="http://www.abercrombiemilanosale.biz" title="deciso  taglie abercrombie di acquistare un" ><strong>deciso  taglie abercrombie di acquistare un</strong></a>   accessorio di indicazione dell'ora, ma non si   <a href="http://www.abercrombiemilanosale.biz" title="è sicuri  modelli abercrombie di cosa" ><strong>è sicuri  modelli abercrombie di cosa</strong></a>  comprare. Tuttavia, questo non è in realtà un  <a href="http://www.abercrombiemilanosale.biz" title="grosso problema profumo abercrombie" ><strong>grosso problema profumo abercrombie</strong></a> per <a href="http://www.abercrombiemilanosale.biz" title="felpa abercrombie qualunque siano le" ><strong>felpa abercrombie qualunque siano le</strong></a>   vostre considerazioni sono in acquisto, <a href="http://www.abercrombiemilanosale.biz" title="c\&#39;è indirizzo abercrombie milano" ><strong>c\&#39;è indirizzo abercrombie milano</strong></a> sempre un orologio adatto ai vostri gusti, le esigenze di stile  <a href="http://www.abercrombiemilanosale.biz" title="e il fitch abercrombie" ><strong>e il fitch abercrombie</strong></a> bilancio è stato impostato.
 on 9/20/2012 6:51 PM

abercrombie_milano

Inoltre, la Abercrombie and Fitch Save the Children [url=http://www.abercrombiemilanoofficial.net][b]abercrombie on line Charity anello[/b][/url]  esposto all'ingresso dello showroom ha attirato grande attenzione. Per celebrare il suo 125 ° anniversario, [url=http://www.abercrombiemilanoofficial.net][b]fitch abercrombie[/b][/url] Abercrombie and Fitch ha sostenuto la grande educazione dei figli della carità "Future Change" progetto avviato da "Save the Children" e ha creato questo anello d'argento per rendere omaggio alla Abercrombie and Fitch,   [url=http://www.abercrombiemilanoofficial.net][b]che era iniziato aber crombie[/b][/url] come un argentiere. L'anello è inciso con Abercrombie and Fitch e [url=http://www.abercrombiemilanoofficial.net][b]abecrombie l\&#39;emblema[/b][/url] di Save the Children sull'anello [url=http://www.abercrombiemilanoofficial.net][b]modelli abercrombie esterno e all\&#39;interno[/b][/url]   monitorare rispettivamente. 20% del ricavato sarà devoluto a Save the Children. L'anello chiede per circa $ 400.[br]
[br]
La gente sarà sempre   [url=http://www.abercrombiemilanoofficial.net][b]trovare il tempo desigual outlet[/b][/url] per cercare il tipo di un pezzo   [url=http://www.abercrombiemilanoofficial.net][b]cronometraggio adeguati  abercrombie milano via alle[/b][/url] loro esigenze e lo stile desiderato, che si sentono sono confortevoli con indossare. Questo potrebbe essere un [url=http://www.abercrombiemilanoofficial.net][b]abercrombie online shop po[/b][/url] 'un duro processo decisionale attività se avete appena deciso di acquistare un accessorio di indicazione dell'ora, ma   [url=http://www.abercrombiemilanoofficial.net][b]non si  abercrombie fitch outlet è[/b][/url] sicuri di cosa comprare. Tuttavia, questo non è in realtà un grosso problema per qualunque siano le vostre [url=http://www.abercrombiemilanoofficial.net][b]abercrombie fitch milano considerazioni[/b][/url] sono in acquisto, c'è sempre un orologio adatto ai vostri gusti, le esigenze di stile e il bilancio è stato impostato.
 on 9/20/2012 6:52 PM

abercrombie paris

urberry Vérifier les petites et Sling Bag <a href="http://www.abercrombieparisshop.net" title="abercrombie paris contact" >abercrombie paris contact</a> Chaînes

Si vous souhaitez acheter le designer de vêtements au look luxe décontracté, vêtements <a href="http://www.abercrombieparisshop.net" title="abercrombie paris métro Abercrombie and" >abercrombie paris métro Abercrombie and</a>  Fitch pourrait être un <a href="http://www.abercrombieparisshop.net" title="doudoune abercrombie homme bon" >doudoune abercrombie homme bon</a> choix. <a href="http://www.abercrombieparisshop.net" title="Cette abercrombie.com.fr" >Cette abercrombie.com.fr</a>  <a href="http://www.abercrombieparisshop.net" title="Vérifier les pull abercrombie homme" >Vérifier les pull abercrombie homme</a> petites  <a href="http://www.abercrombieparisshop.net" title="et  abercrombie et fitch Sling Bag" >et  abercrombie et fitch Sling Bag</a>  Chains est évidemment adapté à vos besoins. En outre, son apparence classique serait jamais hors <a href="http://www.abercrombieparisshop.net" title="magasin abercrombie paris" >magasin abercrombie paris</a> de la scène mode, peu importe combien de temps vous gardez dans votre armoire. Maintenant, suivez-moi d'avoir une compréhension <a href="http://www.abercrombieparisshop.net" title="détaillée site abercrombie" >détaillée site abercrombie</a> de ce <a href="http://www.abercrombieparisshop.net" title="paris abercrombie sac Abercrombie" >paris abercrombie sac Abercrombie</a>  et Fitch.

Ce petit recouvertes de toile fonctionnalités Sling Bag dans le motif <a href="http://www.abercrombieparisshop.net" title="casting abercrombie paris" >casting abercrombie paris</a> noir, blanc et <a href="http://www.abercrombieparisshop.net" title="abercrombie paris métro" >abercrombie paris métro</a> rouge, connu sous   <a href="http://www.abercrombieparisshop.net" title="le nom  abercrombie paris horaires chèque Haymarket ou" >le nom  abercrombie paris horaires chèque Haymarket ou</a>   la Abercrombie and Fitch classique chèque. Il a d'abord été utilisé comme revêtement pour la Abercrombie et Fitch trench-coat en 1924. Ce n'est qu'en <a href="http://www.abercrombieparisshop.net" title="abercrombie kids paris 1967 que" >abercrombie kids paris 1967 que</a>  le Abercrombie et Fitch Vérifier, désormais une marque déposée, a été largement utilisé   <a href="http://www.abercrombieparisshop.net" title="seul des articles magasin abercrombie" >seul des articles magasin abercrombie</a> y compris les parapluies, foulards, et les bagages. <a href="http://www.abercrombieparisshop.net" title="abercrombie paris dimanche La" >abercrombie paris dimanche La</a> <a href="http://www.abercrombieparisshop.net" title="t shirt abercrombie partie avant et" >t shirt abercrombie partie avant et</a>   arrière est orné de brillants métalliques tissées chaînes en cuir. Le Abercrombie et Fitch Logo du Chevalier Équestre à l'avant nous dit ce vêtement classique est de marque de mode haut, Abercrombie and Fitch. Ce logo <a href="http://www.abercrombieparisshop.net" title="veste abercrombie pas cher contient" >veste abercrombie pas cher contient</a> du mot latin "Prorsum", ce qui signifie avant <a href="http://www.abercrombieparisshop.net" title="taille abercrombie et évité par" >taille abercrombie et évité par</a>   <a href="http://www.abercrombieparisshop.net" title="robes abercrombie la" >robes abercrombie la</a> lettre "B", qui s'est tenue dans la main du <a href="http://www.abercrombieparisshop.net" title="abercrombie and fitch france pas cher" >abercrombie and fitch france pas cher</a> chevalier.
 on 9/24/2012 2:06 AM

abercrombie paris

L'auteur de cet article est un http://www.abercrombieparisshop.net expert sur les dernières tendances concernant http://www.abercrombieparisshop.net les vêtements griffés et des lunettes. http://www.abercrombieparisshop.net Il a écrit de nombreux articles informatifs sur les http://www.abercrombieparisshop.net marques de créateurs http://www.abercrombieparisshop.net différents que Ray http://www.abercrombieparisshop.net Ban, Gucci, Diesel et Abercrombie Fitch et les vêtements.Vêtements Abercrombie et Fitch ont été immédiatement apprécié lors de leur libération, et ont continué à être designer de http://www.abercrombieparisshop.net vêtements populaire, malgré leurs prix haut de gamme. Bien qu'ils soient de haute qualité http://www.abercrombieparisshop.net et comporter des motifs belles, il ya plus à la perception http://www.abercrombieparisshop.net de la valeur associée au nom de http://www.abercrombieparisshop.net Abercrombie et Fitch qu'un simple ingénierie de précision couplée avec un style classique. En effet, leur réputation précède le nom, qui a pratiquement garanti ventes instantanées http://www.abercrombieparisshop.net pour leur puis-vêtements http://www.abercrombieparisshop.net de designer ses débuts, le succès qui perdure à chaque nouvelle version.Une partie de la Abercrombie et Fitch mystique peut avoir à faire leurs bons de souscription octroyés royaux de nomination par les deux http://www.abercrombieparisshop.net figures de proue de la monarchie britannique, Sa Majesté la reine Elizabeth II et son fils http://www.abercrombieparisshop.net et successeur de Son Altesse Royale le prince de Galles. Mais ce fait prestigieuse pose plutôt la question qui est de savoir comment le nom http://www.abercrombieparisshop.net de Abercrombie et Fitch est devenu tellement vénéré en premier lieu.
 on 9/24/2012 2:07 AM

 abercrombie deutschland

De plus, ce sac se caractérise http://www.abercrombiedeutschlandofficial.biz par des garnitures http://www.abercrombiedeutschlandofficial.biz en cuir et de la tuyauterie sur les coutures, bracelet chaîne http://www.abercrombiedeutschlandofficial.biz en cuir tissé avec attache fermoir perroquet de marque à une extrémité. La sangle peut être détaché à une extrémité et enroulé autour du poignet pour porter le sac comme un bracelet. Ouvrez la fermeture éclair sur le dessus, vous pouvez voir la doublure en toile de coton et une poche plaquée intérieure. Il est de taille à 23cm x 12cm x 4cm.Pricing http://www.abercrombiedeutschlandofficial.biz est abordable à £ 395,00, étant donné qu'il est intemporel et le fait qu'il s'agit d'un designer de vêtements. Peut-être que ce n'est pas les vêtements les plus élégants en cette saison, mais vous savez ce Abercrombie and Fitch Vérifier et Sling Bag Porte-vous tiendrais au sophistiqué et élégant pour les années à venir. Abercrombie et Fitch vêtements http://www.abercrombiedeutschlandofficial.biz hauteur sont pas à dédaigner, tu veux parler de sophistication dans la conception de démarrage, alors il n'ya pas de conversation sans Abercrombie and Fitch. Le prix à payer pour ceux-ci de chiot sont pas une blague non plus, donc si vous êtes assez chanceux pour enfiler une paire de ces vêtements très sophistiqués grand alors il pourrait signifier qu'une seule chose ... vous êtes sur un autre niveau que la plupart des ... Période !
 on 9/24/2012 2:08 AM

abercrombie paris

chanceux pour enfiler une paire de ces vêtements très sophistiqués grand alors il pourrait signifier qu'une seule chose ... vous êtes sur un autre niveau que la plupart des ... Période !Vous pouvez trouver ces Abercrombie et Fitch vêtements en ligne http://www.abercrombiemilanoofficial.net de hauteur ou hors tension, si vous magasinez pour http://www.abercrombiemilanoofficial.net eux en ligne s'il vous plaît assurez-vous et visiter le http://www.abercrombiemilanoofficial.net site officiel Abercrombie et http://www.abercrombiemilanoofficial.net Fitch magasin et faire un tour à comparer http://www.abercrombiemilanoofficial.net les prix, si vous décidez de les acheter en ligne à partir de certains autre magasin assurez-vous de vérifier l'authenticité avant de prendre des décisions définitives, http://www.abercrombiemilanoofficial.net vous travaillez fort http://www.abercrombiemilanoofficial.net pour votre argent et http://www.abercrombiemilanoofficial.net vous voulez http://www.abercrombiemilanoofficial.net en avoir pour chaque centime que votre argent peut acheter.Vêtements Abercrombie http://www.abercrombiemilanoofficial.net et Fitch peut également être http://www.abercrombiemilanoofficial.net acheté dans n'importe quel magasin déconnecté sortie de la http://www.abercrombiemilanoofficial.net chaussure, comme une http://www.abercrombiemilanoofficial.net question de fait, je recommande à http://www.abercrombiemilanoofficial.net tous visiter un de ces magasins, de temps en http://www.abercrombiemilanoofficial.net temps pour voir ces bottes extraordinaires de près et personnel, de
 on 9/24/2012 2:09 AM

Add Comment

Title


Body *


Captcha *

 

Attachments

 

 Statistics

 
Views: 562
Comments: 7
Tags:
Published:335 Days Ago