.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Jean Paul
satyapriyanayak
ASPEvil
SP
Ashutosh Jha
Post New Web Links

Best method for creating a site definition containing a custom list instance

Posted By:      Posted Date: October 28, 2010    Points: 0   Category :SharePoint
 

Hi,

I want to create a new site definition which, when provisioned, includes an instance of a custom list. The custom list definition is contained in a feature as part of the site definition project. What's the best method for creating an instance of this custom list?

I can think of a few ways to do it:

- Modify the onet.xml for my site definition to include an instance of the list

- Use feature stapling to enable my custom list defintion feature when a site is provisioned using my new site definition and include a list instance in the feature.

Is there another more suitable method?

Thanks,

Rob




View Complete Post


More Related Resource Links

Creating a new root Site Collection using a custom site definition file (ONET.XML)

  
Using Powershell, I am trying to deploy the our custom solution to SP 2010.  The script is doing the following: Deleting the web application using Remove-SPWebApplication Creating a new web application using New-SPWebApplication Adding and deploying a series of WSP files (one of which has the site definition file in it) using Add-SPSolution and Install-SPSolution Create a root site collection based on the site definition file provided in the WSPs using New-SPSite I get the error "WARNING: Template is not found and is not applied." When I run Get-SPWebTemplate, my site definition does not show up. I saw this: http://social.msdn.microsoft.com/Forums/en/sharepoint2010general/thread/5ea46e07-a4b0-4bab-b698-9b6eeb695607 but I want a solution that does not involve me reloading a DLL, as, I feel there is something else I am forgetting. I have also tried: IISReset Resetting the timer service Cleaning the Cache (as described here: http://support.microsoft.com/kb/939308) Nothing seems to work.  Does anyone have any ideas?

Help with creating graphs in a site page from figurative data in custom list

  
Guys Can anyone provide me with someone help please? I need to be able show a graphs/line format in a web part of a site page on my SP 2010 site. I want to use some changing figurative data that is contained within a custom list change a the line/pie chart graph on the fly that is located within a chart/line graph in a site page. Basically when the data in the custom list gets changed by my resources I want to be able to see the changes in the graph almost like a live dashboard. I would be very greatful for some help. Note: I am not a coder nore do I ever claim to be, but if I could get a step by step guide on how to achieve this then I would be very greatful. I have a good understanding of SP but I am not to the coder. I able to supply the list if necessary and if someone could provide me with the code/or if code is not necessary for this task then please can you advise how? Many Thanks Mike Gowlett PMP P2P (MCSE, MSP, Old School :-) 

Creating a Custom List Definition that uses InfoPath Form

  

Hi,

I have created a custom list definition in Visual Studio 2010.  By default it is using the out of the box "pages\form.aspx" for the New/Edit/Display form rendering. 

I am just wondering if it is possible to use an InfoPath form as default for the New/Edit/Display form?

I have tried to create a custom list with custom info path form thru the UI, and export the site as WSP.  I have analysed the files and notice a few things:

1.) I need to add a XmlDocument section in the Schema.xml for displayifs/editifs/newifs.aspx

2.) I need to provision the xsn in "Lists/{List Name}/Item"

3.) I need to provision the *ifs.aspx in "Lists/{List Name}/Item"

As you see, some of the settings required the {List Name}.  That's mean I can't really create a list definition that is reusable because I need to know the List Name before hand. Is there any way to specify the path with some kind of variable instead of static list name?

Furthermore, I notice that the "Developer" tab is missing from the Ribbon when I modify form, hence I can do any code behind.  Is this a limitation, or is there a workaround?

Thanks,

 


Wilson | SharePoint Egg's Blog

Adding custom list to site definition

  

Hello All:

First I will explain what I was trying to achieve.

I wanted to create a site definition or site template with some common features e.g. document library with custom columns and then create many sub sites using that template or site definition.

But the idea is that once all the sites have been created and up and running, if it is required in future to modify the document library to either add or remove some columns then I will simply modify the template/site definition and then apply it globally and all the sites will get updated automatically which were created using that template/definition.

I discovered that I can not get it done using site templates as they are just snap shot of sites and any modifcation can only be applied to new sites created based on template not the ones which were already created.

So, if I go with Site Definition option, what is the best way to do it. Create a custom document library and then create list template based on that and then add it on site definition ?

Or create a feature and do it via code in feature activation.?

Or perhaps there is another better way to do it?

Any help is appreciated

Merci

 


SharePoint Developer

How to add custom list entries to mysite's calendar in Sharepoint 2007 site?

  
Hi,

I would like to know below things

(1) How to create MySite for one specific member with other or administrator's access?

(2) Scenario : Administrator have created one SP2007 site. now Administrator have created one calendar (Sample calendar). Administrator have added some entries in calendar. now one user entered in portal site ansd view the calendar and he click on MySite menu. so this sample calendar entries should enter in that user's mysite calendar. How this can be achieved?

Thanks in advance.
Regards, Praful Udade

Creating List Definitions with Custom List Columns for SharePoint Server 2007

  
Learn to use Visual Studio 2008 Extensions for Windows SharePoint Services to create a SharePoint list definition that implements custom list columns.

Deploying custom 2007 site definition to 2010

  
For a customer I am upgrading their SharePoint 2007 enviroment to SharePoint 2010. After a succesfull upgrade I am stuck with one last annoying problem: when creating a publishing site collection using a custom definition the provisioning of the site definition  fails. Interesting about this is that the provisioning works from the central admin UI, but this customer has an custom webpart for creating site collections in a web application outside of Central administration. The simplified code for this is: public static bool Create(SPWebApplication webApp, string Url, string siteTitle, string siteDescription, uint lcid, string siteTemplate, string ownerLogin, string ownerName, string ownerEmail)         { SPSite site = null; try { SPSite newSiteCollection = webApp.Sites.Add(Url, siteTitle, siteDescription, lcid, siteTemplate, ownerLogin, ownerName, ownerEmail); newSiteCollection.Close(); newSiteCollection.Dispose(); site = GetRootSite(webApp); bool r = (site != null) ? true : false; return r; } catch { return false; } finally { if (site != null) site.Dispose(); }         } The exception is thrown when webApp.Sites.Add() is executed. The user we are logged in as, as wel the appID, are Farm Admin's. The ULS shows this exception: Exception thrown while fetching field by internal name 'Wiki_x0020_Page_x0020

Create a list definition without a Custom Content Type

  
is it possible to create a list definition without creating a custom content type?  I want to create a list definition and select "Custom List" and then I just want to add fields to the custom list and not create a content type that will show up in the SharePoint GUI.  Seems like to get the new fields to show up in the new and edit forms I have to add the fields to a custom content type.

Duplicate field name error, creating new site from custom template

  
I've made a site that maps the site (with a table of contents) and i export it to another site collection. I'm able to install and activate the solution in the other site collection, however when i'm going to create a new site using the site i've installed as a template it pops an error saying "A duplicate field name Wiki_x0020_Page_x0020_CategoriesTaxHTField" was found." I have no clue what this means. Can anyone help me? Thanks in advance

Creating a new site sharepoint 2010 under parent site with my custom template Programatically using

  
Hi, I have a parent website under which i want to create subsites on the fly using visual studio 2010. The subsites which i want to create have a common stuructre(in temrs of lists & custom). So i saved the template in sharepoint 2010,it becomes wsp and goes into soution gallery. Now how do i use this template say mytemplate.wsp,to create site in visual studio. i tried this using (SPSite site = new SPSite ("http://infml01132:5566/sites/VRND " ))             {                 using (SPWeb web = site.OpenWeb())                 {                                       SPWebTemplateCollection myTemplates = site.GetCustomWebTemplates(Convert .ToUInt32(web.Locale.LCID));                     //SPWebTemplateCollection temlates1 = site.GetCustomWebTemplates(1033);                     //SPWebTemplateCollectio

Reg: Does Custom site definition created in SharePoint 2007 works in Sharepoint 2010

  

All,

If one has created a custom site definition in sharepoint 2007, Once the whole site is migrated to sharePoint 2010 will that "custom site definition" created in 2007 will work without breaking in SharePoint 2010?

If No, what has to be done to make it work on 2010.

Thanks,

Srini

 

 

 


BCS Method Security / External Content Type Permissions / Custom List Security Provider / Security T

  

I have an external list setup with the usual CRUD methods.  The external SQL table is also being populated by another source.  I want to enable/disable deleting depending on whether the record was created from SharePoint.  I would also like the normal list permissions to work.  So if a user has permissions to delete on the list, they can only delete items created for SharePoint. 

Where should this logic be incorporated?  On the BCS Delete method, somewhere in the External Content Type or on the list instance?  Most examples I find relate to security trimming for search.  I'm only concerned about the delete method.

I'm sure there are multiple ways to accomplish this.  Which is the best?

Thanks,
Ryan


Error creating a normal Custom List

  

I am using the normal sharepoint screans to create a custom list. When I click create it falls over with

'w3wp.exe (0X2254) 0X2C80 CMS Publishing 8Ztg Medium Got list item version, but item was null. ' on the log files.

This is a publishing template site with no VS custom list definitions.
This is just a normal site.

What can i do to rectify this.


custom publishing site definition

  

What to do , so that  custom   site definition tab  should appear at site collection level only?

What to do , so that  custom   site definition tab  should appear at subsite level only?

what to do , so that particular site definition tab should not appear at particular subsite level at all.


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend