SPList represents a list on a Microsoft SharePoint Foundation Web site.

learn more… | top users | synonyms

0
votes
2answers
33 views

What are the best practices to get all items from SPList

What is the best practice way to get all items from SPList(with query or without) This is my ways : static void Main(string[] args) { try { using (SPSite mySite = ...
15
votes
3answers
26k views

Fastest way to delete all items with C# [duplicate]

Possible Duplicate: Deleting all the items from a large list in SharePoint What is the fastest way to delete all items in a list programmatically? I do not want to remove list and re-create it,...
1
vote
1answer
57 views

Difference between SPList.GetDataTable and SPList.GetItems(SPQuery).GetDataTable

I've few questions as below: Can some one please explain me the difference between SPList.GetDataTable and SPList.GetItems(SPQuery).GetDataTable methods? Explain the meaning of the parameters for ...
0
votes
0answers
15 views

How to get reference to list from custom user control in form template

What I want to do Create a RenderingTemplate for list forms that will display the list fields in groups with some formatting and a heading for each group. How I think I should do it Add a custom ...
1
vote
1answer
27 views

Unique constraint on multiple columns

I would like to be able to set a unique constraint on two columns to avoid entries like in the 4th record below (1234,B1) ColumnA ColumnB 1234 B1 1212 A1 3211 B1 1234 ...
0
votes
0answers
42 views

Why “The property '__deferred' does not exist on type 'SP.SecurableObject'” message appears when trying to update a sharepoint list item?

I know that updating an item in sharepoint list by using REST API should be very easy, but for some reason, I have not been able to do it. I keep getting "400 Bad Request: The property '__deferred' ...
0
votes
1answer
43 views

How synchronization 2 SPList with workflow?

User add item to SPList 'one'. How do we add it item in SPList 'two with workflow? NB: SPList on different servers
2
votes
2answers
3k views

Sharepoint Designer SPList option “Hide from browser” in code?

When I hide the list using list.Hidden = true; It's hidden from the Quick Launch and it's also hidden from the Sharepoint Designer. I'm rather interested in a useful feature for lists in ...
-1
votes
2answers
49 views

How to refresh a sharepoint list from C# console application

Is there any way to refresh a sharepoint list from C# console application. (NOTE: By refresh I mean the same that we achieve by doing a Ctrl + F5).
0
votes
1answer
45 views

Try get attachments to SPList

I tried using this solution with the following code: using (SPWeb web = site.OpenWeb()) { SPList list = web.Lists[ListName]; items = list.GetItems(); table = items....
0
votes
2answers
56 views

SPListItem dont Add new Item

class Vote { public static void DoneVote(DataTable table) { string siteUrl = "..."; try { using (SPSite ...
0
votes
2answers
82 views

How take url Attachments for all items in list

I have an SPList. How I can get attachment URLs for every item in the list?
0
votes
0answers
20 views

Get the Address of the User

Is there a method in which I can get the physical Address of an user? This information is visible in the Exchange profile, but so far we have not found a way to get it from the SP.UserProfile content.
1
vote
1answer
52 views

Set List GUID when adding to SP.ListCollection (REST or JSOM)?

Sharepoint Online context; I've read lots os posts and the class reference and seems it's not possible, so I want to confirm if is it not possible to set List GUID when adding to SP.ListCollection (...
1
vote
1answer
53 views

Add SPListItem with file

I have a library, that have items and each item has additional File field. I can upload them programmicaly - firsly file is uploaded, then empty item is updated with other info. Example of filled ...
1
vote
0answers
16 views

Create custom list in sharepoint with a list template using JQuery [duplicate]

I need to create a custom list in Sharepoint 2007 using JQuery (only!) using a custom list template. I'm using Sharepoint 2007. Is there any way to do it? I already know to create the list and update ...
1
vote
1answer
29 views

Failed dropdown list binding

I Am trying to bind a custom list from http://mysharepoint/subsite/subsite/lists/sourcelist with no luck. Any thoughts why it's not working? using (SPSite site = new SPSite(SPContext.Current.Site....
3
votes
1answer
80 views

Create custom list in sharepoint 2007 using JQuery

I need to create a custom list in Sharepoint 2007 using JQuery (only!). I'm using Sharepoint 2007. Is there any way to do it?
1
vote
2answers
95 views

Issue in Generating Charts using Google Charts and SPServices and jQuery against SPList in SP 2010

I was trying to generate a line chart connecting to SPList as shown below. But am getting the error undefined here: alert(' inside completfunc xdata.responsexml is .....'+ xData.responseXML....
0
votes
1answer
28 views

Approaches for porting content from one SPList to another SPList

I have one SPList -say List1- with some 400 items with single line of text, dropdown, lookup,peoplepicker, multiline fields etc. I need to copy the entire from this List1 to a new list that has ...
0
votes
1answer
86 views

Efficient way to get all the field (column) values in an array from SharePoint List

I have to get all the field (column) values in an array from a SharePoint list. Right now I am looping through all the items in the list and creating an array. But it is very inefficient if I have ...
3
votes
1answer
112 views

CalculatedColumn or SPServices with jQuery in SP 2010 List

I need to create a calculated column -say ResCount - based on another datetimefield field, ie,assuming if mydt is my datetimefield, from this field, I need to extract month part and based on month ...
7
votes
1answer
234 views

Efficiently get a collection of all users following a list in SP2013 using CSOM or SSOM?

Does anyone know if there is a way to leverage the SocialFollowingManager() class or the SPList() class to efficiently get a collection of all of the users that follow a specific List? I thought ...
0
votes
1answer
22 views

Browser crashes when navigates to the custom SPList

My Browser crashes when navigates to the custom SPList I created for the purpose of custom form and its validations. Am stuck with why this happens. Till two days before the custom form was working ...
2
votes
3answers
131 views

web.GetList(“Lists/TestList”) throws FileNotFound exception

I have the following code in my application. It is throwing FileNotFound exception at `web.GetList("Lists/TestList") This list exists and I am able to get the list from web.Lists.TryGetList("...
0
votes
0answers
19 views

Restore viewstate while cancelling request

I have a SPItemEventReceiver with custom ItemAdding handler. When any exception occurs (frequently it's just a model validation) it handles this exception in Handle method. Now it looks like this: ...
1
vote
1answer
156 views

List Item Name not populating - PowerShell

I have a PowerShell script that outputs to a CSV file all items from all Lists and all files from all Document Libraries in a Site shown below: function Get-DocInventory([string]$siteUrl) { $web = ...
0
votes
2answers
111 views

Retreive all Items from All Lists from a site - Powershell

I have a PowerShell script that outputs all documents from all Libraries within a Site (web) scope to a CSV file listed below: function Get-DocInventory([string]$siteUrl) { $site = New-Object ...
0
votes
2answers
76 views

Update SPList.ImageUrl after migration from SP2007 to SP2013

After migration from 2007>2010>2013 for all lists ImageUrl property is still on 2007. If someone have powershell script which updates all lists on site SPList.ImageUrl property from SP2007 version to ...
9
votes
3answers
14k views

How to change internal field name(column name) of sharepoint list?

Can we direct change it from sql database? if yes then how? or any other solution?
0
votes
0answers
132 views

Validate checkboxes and textboxes in SP 2010 List NewForm.aspx on Save Click -PreSaveAction

I am having a new form created on my SP 2010 List, mycustomnewform.aspx and i have some 6 checkboxes and 6 textboxes.Now I need to validate these textboxes' value when a checkbox is checked. I ...
0
votes
0answers
76 views

Unable to update RichTextMode from Compatible to FullHtml

As the title says, I am unable to update the RichTextMode property of the Description field on a Calendar List. I am trying to update the field so that it supports "Enhanced Rich Text". Snipp: ...
1
vote
0answers
41 views

Is there any other way to create a list template programmatically Other than by using Server object?

Server Object is having a function SaveAsTemplate() to create list templates. By any other means can we create the list template other than server object ?
0
votes
2answers
132 views

C# SSOM turn on List Rating settings

I have been using the method described here by attempting to use reflection to turn on the Rating Settings of a list. However, I get the following error: Exception Message: exception has been thrown ...
1
vote
0answers
37 views

SPList performance issue

I am having a SPList with some 500 records/items in it. My visual web part used to read this SPList whenever the page loads and the SPList was populated by a timer job on a daily basis. The customer ...
3
votes
3answers
1k views

Enable versioning on SPList programmatically

I might be missing something obvious, but I am trying to enable version history on a regular task list programmatically. It is definitely possible from the UI, but how can this be achieved in code? I ...
1
vote
1answer
35 views

SPListItem update conflict

Task: when user updates an item, change synchronously another hidden field of this item. Problem: save conflict occurs AFTER update is called (not on this line). I subscribe on EventReceiver's ...
1
vote
1answer
380 views

GetItems from SPList case sensitive

I have troubles with CAML Query and GetItems method from SPList. I get a SPList from web context: SPList docTypeList = _web.GetList(string.Format("{0}{1}", web.ServerRelativeUrl, ...
0
votes
0answers
100 views

Show Hide Div based on DropDown SharePoint Visual Webpart

I have a cascaded drop-down on my page that is being populated from SPList on site. Now Based on this drop-down's Selection i want to show or hide Div containing 4 more controls. If any one can help ...
0
votes
0answers
17 views

SharePoint manipulating content on ListItem insertion

Long story short, I am parsing an XML document and adding items to the Body field of a discussion board. The XML has a <body> element that contains encoded HTML that I am adding to the list ...
2
votes
2answers
454 views

Avoid SharePoint 2013 List View Threshold

In client environment we cannot let our hands on SharePoint list threshold. in such case rest api is not usable, there for i moved to the approach of content iterator and found that it also have a ...
0
votes
2answers
201 views

How export list in excel file

I want to create a button that exports specific list into the excel file. But when I do it I always get the same error: Error List does not exist. The page you selected contains a list that does ...
2
votes
1answer
640 views

How to modify the existing list template file in SharePoint

I want to modify a list template which is already created in my site collection.Once I upload the list into the template gallery it becomes a .stp file.But how to modify this again? I am having a ...
1
vote
4answers
2k views

Get List by “InternalName”

I'm trying to use the SharePoint 2013 JavaScript Object Model to retrieve a List via an internal name equivalent. SPList doesn't have a Name or Internal Name property. It is referred to by the Title;...
0
votes
1answer
51 views

Error passing spweb and splist variables as function parameters

I need to pass SPWeb an SPList as function parameters: string check(SPWeb web1, SPList splist1){} Yet, web1.Title, splist1.Title throws errors: There is no Web named "/http://DevSite". Is ...
0
votes
0answers
59 views

Check for mandatory fields while saving Sharepoint Item programmatically

I have a Mandatory field in a list. I need to save the item and not create the item. I need to implement the it using custom JavaScript and not use the save button on the new form. Also need to ...
1
vote
1answer
276 views

Modify list item field using PowerShell

I have a list field that stores an XML string. I am trying to get the XML contents and modify a particular tag in the XML like so: foreach($item in $list.Items) { if($item["XMLField"].Contains("...
2
votes
1answer
131 views

Get Checked out items in a document library

I have a document library which has 18000 items. When I go to the All Site Contents page, I see 18000 items against the document library name. But when I query the items in C# as foreach(SPListItem ...
9
votes
2answers
232 views

Efficient way to retrieve all list items

I am retrieving all items from list containing around 4000 items. But it seems to take longer time to fetch all items which is ~15 to ~22 seconds. Is there any best way to fetch all items from list in ...
1
vote
3answers
2k views

update SPList using csv via Powershell

knowing that is possible in PS, exporting SPList items to PS objects(link1 link2) what is the best way, to go into the other way: Create/Update an SPList from an exported csv or format-table.