Tag Info

Hot answers tagged

13

You can retrieve the schema of any list by using the owssvr.dll call from your browser. Following is the syntax: http://YOUR_SERVER_URL/PATH_TO_SITE_CONTAINING_LIST/_vti_bin/owssvr.dll?Cmd=ExportList&List={YOUR_LIST_GUID} By replacing the Server and List GUID in above url will return you the XML Schema of the list. This works on both 2010 and 2007. ...


10

The property mentioned by djeeg works if it is set on the list element in your schema.xml: <List Title="A List Definition" ... NavigateForFormsPages="TRUE"> This is the equivalent to setting "Launch forms in a dialog" to "No" under advanced list settings. It doesn't show up in the schema, but I've verified that it is still effective.


10

So, after a few weeks on and off trying to figure this one out, having no luck with any replies on any forum, I just thought I would have a look at how the UI page was doing this. (Why didn't I think of this earlier?!) That's when the property EnableMetadataPromotion showed up. Having this keyword to search for, it didn't take me long to google the missing ...


9

Well, basically because in your CAML declarations you are performing three different operations. Let me explain this in a simpler way. You first define the field as Site Columns in your element file (sample shows the declaration of one of the OOB field): <Field ID="{8c06beca-0777-48f7-91c7-6da68bc07b69}" Name="Created" ...


5

The "problem" is that every list and library is bound to a content type. Unfortunately Microsoft hided that by disabling "Allow Content Type Management" by default. When you create a new field like you did it is added to the list but not bound to the content type the list depends on. If you go to the list settings and enable Content Type management you can ...


5

List definitions provide a template for you to create lists from. A List Instance is a single "instance" of a list created from an aforementioned list definition. A List instance can also be instantiated with data.


4

By just looking at your XML I noticed that you defined Url="AllItems.aspx" in all of your views. So every 'new' view is overwriting last one added and you end up with only one view. You need to set different Url attribute for each view.


4

This can be done either by setting EnableContentType=true in the list definition or in the feature activation event we can set the attribute. Please refer the below links. They will definitely help you in solving your problem. http://snahta.blogspot.com/2009/02/enable-managing-content-types-by.html http://msdn.microsoft.com/en-us/library/gg276355.aspx ...


4

This says to "toggle the SPList ContentTypesEnabled property from False to True".


4

The SPList.BaseTemplate property tells you what list definition was used to create a given list. Also, LINQ is by far the most efficient way to query all the lists in your site -- and this could obviously be extrapolated to query all lists within an entire site collection too (see Example 2 here). Creating nested "foreach" loops to manually enumerate all ...


4

Turns out I had made a wrong assumption. I thought the formula used the internal name of the field, but it actually uses the DisplayName. So either changing DisplayName to TestDate or changing the formula to TEXT([Test Date],&quot;MMMM&quot;) will fix the problem for me. It caught me out for so long because I had copied the fields out of an exported ...


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: ...


3

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 ...


3

In SharePoint Foundation, there is only one option when you need some OOTB column for displaying picture: use 'Hyperlink or Picture' column. This column is represented by SPFieldUrl class, which have DisplayFormat property, which can be either Hyperlink (default) or Image. In CAML (i.e. in schema.xml), you will need provide following attributes to Field ...


3

Hello Michal: There is nothing out of the box that would offer that functionality. Indexes are unique on a per column-basis and each column index is independent. The ItemUpdating event receiver is the best place to do this. You could simply have the event receiver query the list to see if a duplicate record exists before the item is created or saved.


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

Trying to change the display name of the Title is going to be an uphill struggle: There are several versions of the same column, each with their own DisplayName (some of which are created in the list). If you open your list in SharePoint Manager, you'll see the various hidden Title fields. My advice would be to hide the title field (Hidden="TRUE" in the ...


3

Yes I believe this is the case. When creating a List by the template shown in your screenshots a List Definition is also created, and then you can delete the List Instance. If you do this the List tab will simply not be clickable, and you can design your independent List Definition. Walkthrough: Create a Site Column, Content Type, and List for SharePoint


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

In PowerShell you can add a library the same way as you would do in C# code First you get the Web $url = "<url web>" $web = Get-SPWeb $url Then get the template name of a definition To determine the name you can use someting like $web.ListTemplates | Select Name, BaseType Then take the name. The example below takes the document library ...


2

If you've created the list in the web interface, save the site as a template, which will download it as a WSP package. In Visual Studio, create a new project and select the project template which creates a project from a WSP file, it's somewhere under SharePoint in "New Project" template selection. There you can dig out all the definitions for that site and ...


2

Upgrading artifacts depends on the type of artifact in question, and depending on the platform (MOSS vs SP2010). In SharePoint 2010 question the story is different than in SharePoint 2007, since you have feature upgrade, both declaratively and programmaticly (feature upgrade event handler with parameters set declaratively). Further info regarding feature ...


2

I dont think there is. The code property is NavigateForFormsPages http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splist.navigateforformspages.aspx But it doesnt appear on either the list or listinstance schema http://msdn.microsoft.com/en-us/library/ms415091.aspx http://msdn.microsoft.com/en-us/library/ms476062.aspx I did a little test, ...


2

The deployment and implementation included in Wictor's article is only suitable for 2010 due to how the solution package would be deployed and how the custom web part is referenced in the custom page. In 2010 sandboxed webparts are referenced using the SPUserCodeWebPart wrapper which does not exist in 2007. In 2007, you can reference the web part directly ...


2

Removing the ContentTypes reference isn't necessarily the right way but I'm pretty sure it's the wrong way. They're there for a reason. You have two options. First, you can create a content type and specify the fields that way. See http://msdn.microsoft.com/en-us/library/ff728096.aspx for information on how to build up the custom list through a content ...


2

Once the list (or webs for that matter) is created there is no more link between new versions of the definition. You should envision configuring those via code.


2

WHat do you mean by "options available to fields". Do you mean you want to add extra Choices to a Choice field used in the list? If so, create a feature with a feature receiver and access the SPList, the the available fields in the list, get the field you want to update, Cast it to a SPFieldChoice, add the new values to the Choices collection and call the ...


2

If I understand correctly, you should show last modified date of row in list view, am I right? In this case you could select List tab in the ribbon, click on modify view button, in the fields list select check box near the Modified field, click ok. This field will be added to the view.


2

If I'm not wrong you can create site template and then import this template in Visual Studio 2010. When the template is imported, you can choose what elements do you want to include in new solution. You can choose your list. The VS2010 creates all needed files. After this you can simply package this solution.


2

Well you made changes to List Schema definition, changes will only be applied to New Instances of List not to existing one. You have to write additional Upgrader feature which will Add the view programatically. You can also look into the http://www.sharepointnutsandbolts.com/2010/06/feature-upgrade-part-1-fundamentals.html (Upgrade Feature Concept in ...



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