Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
7

WebDav might work for others, but I found a way to do it using the SharePoint object model. (I used the folders indicated by Steve B--thanks.) $site = get-spsite "http://myteam.lab/sites/team" $web = $site.OpenWeb() $spFolder = $web.getfolder("List Template Gallery") $spfilecollection = $spfolder.files $file = get-item c:\temp\MyTemplate.stp $...


7

I have the same need. I've come across this solution: https://danielthenerd.wordpress.com/2012/06/14/list-template-lookup-by-list-name-not-guid/ Basically, taking the STP, converting it to a CAB, extracting the Manifest.xml, editing it so that the GUID reference is replaced by a name, since the GUID is auto-generated at "run-time". <Field Type="Lookup" ...


6

Not to my knowledge. I've always chalked this up to that when the lists are saved, the look-ups are dropped because there is no guarantee that when the lists are provisioned, that the other dependent list will exist, so it can't save the data. Something I've been meaning to try is to provision the lookup list first then provision the main list and see if ...


6

How to identify a SharePoint List Template ID (in Browser) The global variable g_wsaListTemplateId is available on the client side when the List is rendered Navigate to List - Press F12 to launch Dev Tools (details) and switch to Console window and run: console.log(g_wsaListTemplateId) Export List Schema Construct the following query to export List ...


5

You can cheat using Webdav : Copy-Item 'yourTemplate.stp' '\\yourspwebapp\DavWWWRoot\sites\yoursitecoll\_catalogs\lt' [edit] according your comment, here is a way to find the correct url. Navigate using the browser to the list template catalog list. The link should look like : http://yourwebapp/sites/yoursitecoll/_catalogs/lt as it is a document library, ...


5

The method SaveAsTemplate is not exposed in CSOM API, there is a general suggestion opened: Expose List.SaveAsTemplate() for CSOM API Basically you can create lists using already existing custom templates, but programmatically you cannot create new ones. Site.GetCustomListTemplates(web); Web.ListTemplates What you can do is define the list schema xml and ...


5

As you know the BaseTemplate of discussion board, so you can apply $filter in your all lists /_api/Web/Lists?$filter=BaseTemplate eq 108 Make a GET request to the above URL, It will return all lists those are using discussion board template. Example using jQuery function getDiscussionBoardList() { $.ajax({ url: _spPageContextInfo....


5

You can save the list as a template, then create it where you want. The updates on the list view won't be migrated, so what you can do is: Open the first list in SharePoint Designer, by clicking on Lists and Libraries from the left menu in SharePoint Designer, then choose your list name. From the views menu, choose your view name where you have the ...


4

I cannot test this because I dont have a dev environment at the moment, but the following should work: ListCreationInformation lci; List list; lci = new ListCreationInformation(); lci.Title = title; lci.Description = description; ListTemplate lt = ClientContext.Current.Web.ListTemplates.First(z => z.Name == "MyTemplateName"); lci.TemplateFeatureId = lt....


4

First, a list definition and a list template are not the same, even though the api treats them as if they are. As far as I know, list definitions do not appear in the template gallery. You say you are able to create lists from your custom template using the web interface, so I'll assume you have the feature defined with the list definition in it and that ...


4

AFAIK, no. We faced this problem a while ago, and unfortunately, haven't found any solution. Now we're shipping version with Calendar lists only to new customers, while customers with previous versions of product are basically... hm... out of lack :)) In your situation I'd recommend you to create a console application, and move the items programmatically ...


4

Do you want to get the information through code, or only through the UI? For example the ListTemplateId can be found as variable when you look at the source code of the site where the list is displayed (for example: var g_wsaListTemplateId = 100). You can get this value with javascript. Or you can use server API: SPList.RootFolder.Properties["...


4

You cannot create a new list based on a custom list template with only JavaScript Object Model. You would need to first use Visual Studios to create a custom List Definition. To achieve the same outcome using only JavaScript Object Model, you can do the following: Load all the properties and fields of your template list, and pass those to a function ...


4

Activated "Team Collaboration Lists Feature" and it works now.


4

You have to provide js file URL in JSLink property each time while adding your list view web part on the page. List and the list view web part are not the same thing. Saving the list as a template will give you the functionality of generating the same list with same columns and also with including data but will not include list view web part. List view web ...


3

If the document library was saved as a template, then it would be in the list template gallery in site settings. From there, it can be downloaded to your desktop, uploaded to a production list template gallery, and new document libraries provisioned from it.


3

I am going to provide an answer that will work in 2010. I will need to depend on others who are more versed in MOSS for that; however, I believe there is a similar stsadm command for the Powershell I will provide below. The Export-SPWeb command is able to be defined for a site, list or library. I have used this extensively to move a troubling list from ...


3

You can save the list in SharePoint 2007 with content - you can then save the .stp to the file system and you'll need to open up the .stp file (rename it to cab). You then need to update the version number within the manifest file from 3 to 4 and recab it. You can then upload the new .stp to SharePoint 2010 and create your list.


3

Gary LaPointe has written some particularly ace extensions to stsadm that allow you to import, export, and copy lists (among many other things). The documentation for these commands can be found here: Import/Export/Copy Lists I've used these in the past to move lists containing lookups around successfully; I'm pretty sure the lookup values and IDs had an ...


3

You have to disable output escaping by adding disable-output-escaping="yes" to the element. It is covered in this post on MSDN. http://blogs.msdn.com/b/ben_hickman/archive/2009/05/22/content-query-web-part-example.aspx


3

When creating a custom List Definition in Visual Studio, you will normally have an Elements and a Schema file (and maybe custom forms, etc). When you create a feature, you should see your List Definition listed an an element you can add to your feature. If you don't see it in VS2010, you probably have the feature scoped incorrectly. List Definitions need to ...


3

I assume you want to create a list definition based on existing list definition that comes with SharePoint or installed by other solutions. I would just use the VS.NET > Add New Item > List Definition and select Custom List as base. Then locate the existing list template directory in SharePoint root and copy 1) schema.xml and 2) element file ...


3

The <Receivers ListTemplateId="101"> specifies that the following receivers are for all lists created using the ListTemplate with Type=101, which is all the once created as pure "Document Libraries", but not "Asset Libraries", "Form Libraries", ... Custom List Templates. If you need to cover all these then you need to either: specify the entire list ...


3

The difference is, that a list created from a template is not coupled with the template after creation. For example: If you add a new field to the content type, all lists can be updated automatically to include the new field. That is not true for a list template. All definitions (content types, list templates) are stored within the content database, because ...


3

Separating each question. Your Id of the <ContentTypeRef ID="0x0120" /> specifies a reference to a content type to associate with the lis you are creating through the list definition. In particular, you are telling to associate Folder Content Type. By the other hand in the Elements.xml, type="1116" is wrong because doesn't exist (take a look here If ...


3

Can you use List.BaseType? Something like: var list = ctx.Web.Lists.GetByTitle(listTitle); ctx.Load(list); ctx.ExecuteQuery(); bool isDocLib = list.BaseType == BaseType.DocumentLibrary; Sorry if that's not valid C#, here's what I tested in JavaScript: ctx=SP.ClientContext.get_current() list=ctx.get_web().get_lists().getByTitle("Pages") ctx.load(list) ctx....


3

I had an similar Problem. Openup the sharepoint designer and go to the list. In the Details you will se the list guid Take the guid and open the pages with sharepoint designer in wich the error occur. Search for "WebPartPages:XsltListViewWebPart". In this there exist a attribute that is named ListId. Check if it is the same id from the list. After that ...


3

You can access the members of an enumeration (or any JavaScript object for that matter) using the C# indexer syntax. So the code you want would be something like: var typeList = SP.ListTemplateType["announcements"]; listCreationInfo.set_templateType(typeList); You can use a for loop to iterate all of the property values of the enumeration. var message = $(...


3

When you save your SharePoint site as a template, you’re saving the overall framework of the site – its lists and libraries, views and forms, and workflows. In addition to these components, you can include the contents of the site in the template, for example, the documents stored in the document libraries. This could be useful to provide sample ...


2

If you can see your new feature in 14\TEMPLATE\FEATURES than all you need is to activate it. You can use PowerShell command (SharePoint 2010 console): Enable-SPFeature –Identity FolderName –url http://mysite or STSADM : stsadm –o activatefeature –name FolderNAme –url http://mysite Than try to create new DL from appeared template


Only top voted, non community-wiki answers of a minimum length are eligible