4

You can do this as follow- Add Site Columns to the custom Solution in the Visual Studio. Add The Content Type if Required. Create List Definitions & Associate the Content Type to the List (If required). Add the List Items in the List Instance by default. In the Items Here Deploy this solution & you can see the List with default items. For the ...


3

Have you tried the LCID attribute? I think that is the one you should try! <Field ID="{1706A5C3-AC44-4685-A075-6019FAF9D940}" Name="Budget" DisplayName="Volumen (in €)" Type="Currency" LCID="1033" /> ofcourse replacing "1033" with the wanted local (like 1045 for Polish) Edit Per MSDN: Optional Integer. The LCID attribute can be used to ...


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


3

If you add list using ListInstance then you can add items using ListInstance file: <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <ListInstance Title="LinkList" OnQuickLaunch="TRUE" TemplateType="170" FeatureId="Your feature id" Url="Lists/LinkList" Description="Your description"> <...


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: http://srinivasananand.wordpress.com/2013/10/10/sync-button-for-document-library-...


2

Try with the following code, Add-PSSnapin Microsoft.Sharepoint.Powershell [CmdletBinding()] Param( [Parameter(Mandatory=$true,ValueFromPipeline=$true)] [string]$Web, [Parameter(Mandatory=$true)] [string]$ListTitle, [Parameter(Mandatory=$true)] [string]$ListUrl, [Parameter(Mandatory=$false)] [string]$Description, [...


2

EnableContentTypes="TRUE" instead of EnableContentType="TRUE" (note the s)


2

Your .cs, .ascx, .xml and .xsl files are only invoked when rendering the field, and each time the field is shown on forms & list views. The contents of the elements file will reference something in the Schema file, so the schema file is loaded first before the contents of the elements, and this is done only on Feature activation. For the rest, the ...


2

Try this : <!-- Parent ContentType: Document (0x0101) --> <Field ID="{01854464-EABC-4726-A517-397A4EA224C2}" Name="dueDate" StaticName="dueDate" DisplayName="due Date" Description="dueDate" Group="MyDoc Content Types" Type="Calculated" Format="DateOnly" ResultType="DateTime" ReadOnly="TRUE" > <Formula>=DATE(YEAR(Created),MONTH(...


2

Your list instance must have a FeatureId attribute that maches your ListDefinition's feature. This is not added by default, so it's likelly that this is why you are getting "Cannot complete this action". E.g. <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <ListInstance Title="ListDef" ...


2

Yes, this is a rather annoying "feature" in 2016. "Restricted" seems to be a new reserved keyword of some sort which causes issues due to naming conflicts. We just went through a large migration process which resulted in numerous apps failing because we were querying based on "Restricted" and specifying that field as viewfields and select parameters.. Now, ...


1

I would look into using a Feature Upgrade. By adding versions to your feature, you should be able to get around re-deploying the list instances and overwriting what is there, because the version you are deploying now is, for example, version 2.0.0.0, and the original version (that included the action of deploying the list instances) is 0.0.0.0. Since you'...


1

I have tried this. It is working fine. Please check the followings: Elements.XML <?xml version="1.0" encoding="utf-8" ?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <Field ID="{58CA5957-14FA-450A-BE5C-A7C396DCC757}" Type="Text" Name="News Blurb" DisplayName="News Blurb" Required="TRUE" Sealed="TRUE"/> <Field ID="{...


1

ShowField="ImnName" use this one to view user name


1

Typical, spent days and days trying to resolve this, i post here and then manage to resolve it myself. After reading some Microsoft documentation it would seem all examples i've seen on the internet miss out one key thing, Inside the tag or tag for where you want the webpart to appear there needs to be the tag and then all of the above (minus the tag i ...


1

Try: Step by step exclude some block definitions from list definition to find out what exactly doesn't work. Another recomendation, do not use gaps in Name property of the Field definition, it will be changed into something like _x2000, could be error with FieldRef of content type connection. In FieldRef try to use only necessary properties like ID, Name ...


1

I may have resolved it but it didn't have anything to do with any of the code I created. I needed to redeploy the feature and I looked over the existing featres on the site. I disabled the PowerPivot Feature Integration for Site Collections feature and my custom lists that get created in my feature show the correct icons now. I don't know why that would ...


1

You use a List definition if you want for example a common list structure that uses custom content types and views for project-item tracking in multiple Web sites, but the built-in lists are not suitable. For this you can create a new list definition feature that will can activated on each Web site that requires the list. Instead of a Site definition its ...


1

Try adding the attribute UseLegacyForm=”TRUE” . For e.g. <Forms> <Form Type="DisplayForm" Url="DispForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" /> <Form Type="EditForm" Url="EditForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" /> <Form Type="NewForm" Url="NewForm.aspx" SetupPath="pages\form.aspx" ...


1

In your Schema.xml add this or change your column like below code: <Field Name="Picture" ID="{6eeec5fa-ed6f-495d-9622-e5362e6925aa}" DisplayName="Picture" Type="URL" Height="150" Width="224" Format="Image" /> In eventreceiver or User Control or in Feature: To get value from a URL Field: SPFieldUrlValue urlField = new SPFieldUrlValue(item["Picture"]...


1

Go to Library Settings>Advanced settings, then set Allow management of content types? to yes.


1

Bit confused are you using a custom list definition or Microsoft one, the reason I ask is that the list instance is referencing a template of 106, the Event List, which is an out of the box list def. You will need to use a copy of the schema.xml that Microsoft or you have created for the Event list. Find the definition in the SharePointRoot/Template/...


1

In your C# code you could use the SPUtility.GetGenericSetupPath with the 14 HIVE relative path to the file to get the full file system path of the file. Then use the full path to open the file from the file system. SPUtility.GetGenericSetupPath(@"TEMPLATE\FEATURES\") would return c:\program files\common files\web server extensions\14\template\features.


1

Accomplished with the following code in Feature Activated event receiver. SPSite site = null; SPWeb web = null; site = properties.Feature.Parent as SPSite; web = site.AllWebs["SubSite"]; SPListTemplate temp = web.ListTemplates["ListDefinition"]; Guid newg = web.Lists.Add("ListInstance", "Description", temp); SPList newlist = web.Lists[newg]; newlist....


1

Create your List Definition using a Web Scoped feature. Set the feature attributes to Hidden=True. You can then activate your feature manually using PowerShell for that sub-site. For further automation you can either staple your feature to specific templates (so it is automatically included in sites which uses a specific template) or reference it in the ...


1

If the title field is not needed it's better to not use it at all, than to use it for another text field. As standard it shows as a link and you have very little freedom with it (not to mention the other bugs it can throw up) If you want to exclude the Title field from your list and forms all you need to do is: Set the title field as not required under ...


1

You should try something like <View BaseViewID="2" DisplayName="Team Calendar" Type="CALENDAR" WebPartZoneID="Main" MobileView="TRUE" MobileDefaultView="TRUE" SetupPath="pages\viewpage.aspx" ImageUrl="/_layouts/15/images/events.png" Url="calendar.aspx" RecurrenceRowset="TRUE" DefaultView="TRUE" ShowHeaderUI="TRUE" MobileUrl="_layouts/15/mobile/viewdaily....


1

Solved the issue myself. Apparently the custom lists columns was both named "Column name" and had the display name "Column name" in the XML-code. The column name should be "Column_name". Sharepoint fills the blank with %20 and this creates my issue.


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