Tag Info

Hot answers tagged

12

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.


9

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


6

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


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

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

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

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

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

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

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

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


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

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

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


2

As mentioned, create a project with multiple features. Here is how I typically do it: Feature 1 = Site Columns and Content Types (sometimes I'll separate Content Types into different features) Feature 2 = List Definitions (aka List Templates) Feature 3 = List Instances (if applicable) Feature 4 = "empty" feature with Activation Dependencies on the ...


2

I don't think there is some other way to keep list definition synchronized if you make changes to deployed list via UI. For future reference I have found a quick tutorial on how to do this: Simple Way of Creating a SharePoint 2010 Custom List Definition However since you are developing custom list definition in Visual Studio the 'proper way' to achieve ...


2

I'm not 100% sure which users should be allowed to do what, but if you need to give difference Controllers control of difference list items then you could look at Setting item level security in an eventhandler


2

Make sure that the FeatureId attribute in your ListInstance matches the ID of the definition's feature. Make sure the Type attribute in your ListTemplate element matches the TemplateType of your ListInstance (in your case, 2010001) Put both at the same scope. If the definition is at the same scope as its list instance and properly referenced, SharePoint can ...


2

@Kate Ponomareva sorry for the delayed reply (wasnt online), follor below steps to add html form webpart 1 : through SPD create your required forms for the respective list and make them as default or you could use the default form itself 2 : go to your sharepoint site, click on the list from View All Site content or Quick Launch 3 : in top ribbon click on ...


2

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


2

I found the mistake... The BaseViewId was 0. After I changed it to 1, the link under the View is correct. "Add new Item" fyi: <View BaseViewID="1" Type="HTML" WebPartZoneID="Main" TargetType="List" DefaultViewForContentType="TRUE" DisplayName="$Resources:core,objectiv_schema_mwsidcamlidC24;" DefaultView="TRUE" MobileView="TRUE" MobileDefaultView="TRUE" ...


2

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


2

I also encountered the same problem recently. I found this blogpost that explains the cause: http://srinivasananand.wordpress.com/2013/09/04/sp2013-sync-button-doesnt-appear-for-document-library-created-with-custom-list-definition-2/ and here he has suggested one work around: ...



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