Representation of a list item within the SharePoint API.

learn more… | top users | synonyms

6
votes
1answer
2k views

Attach a file to the list item

I attach a file to the list item when it is updating and when new item added. Additional condition when item updating - if the file already exists, remove it and replace the new one. I receive events ...
7
votes
2answers
4k views

PowerShell: Update People Picker Field with domain\Username

I'm trying to get this to work in PowerShell: $spListItem[$ppField] = "domain\username" $spListItem.Update() This gives me the following error: Exception calling "Update" with "0" ...
0
votes
2answers
34 views

add an SPListItem from a web part

I'm in a sandbox solution. I'm trying to add some items in a list from a click button in my webpart. It seems easy but with sandbox everything comes difficult. Here is my code and I've an exception ...
0
votes
1answer
37 views

Change a property in an ItemUpdated event receiver

I have a very simple code but I can't change a property in an ItemUpdated event receiver public override void ItemUpdated(SPItemEventProperties properties) { base.ItemUpdated(properties); ...
1
vote
1answer
2k views

SharePoint 2010 - get list item from search result

I'm using FullTextSqlQuery to search items on specific list. Query returns results properly. Now I'd like to get SPListItem from search results. As I searched Internet, I found couple of examples, but ...
0
votes
1answer
16 views

How to track web request made to sharepoint site from remote computer

I am trying to connect IBM datastage application to a sharepoint list using soap web services. I am using GetList and Getlistitems to get the data from sharepoint list. While doing this i can ...
1
vote
0answers
20 views

Replace default List View Web Parts

As the title explains, I am trying to remove the default Web Parts that are associated to list items and replace them with my own custom web parts. Here is what I've attempted so far: SPList list = ...
1
vote
1answer
30 views

How to add grid lines to display form of a list item

I am trying to figure out how to make my display item form look like a table. I am using SharePoint 2013, and currently, the display form can be a bit difficult to read without lines separating ...
0
votes
3answers
53 views

OfType<SPListItem>() says SPListItemCollection does not contain a definition for OfType()

I'm using Linq to SharePoint rather than CAML to query list data from SharePoint. See the code I have written: SPList productsList = SPContext.Current.Web.Lists["Products"]; ...
0
votes
2answers
98 views

Getting Item and value from list by Specific Data

I would like getting a specific item from a specific list but i don't have ID, just a field (column) value. Here's my list: On the site, i have only the name...i'd like to recover the paid leave ...
0
votes
1answer
17 views

Error in setting up custom edit form for a List Item (SharePoint 2013)

We have a list for which we wanted to bind a custom aspx page for editing the list item. we have written the following sample console application to check it. public class Program { public ...
3
votes
2answers
769 views

Attach ListItem to TaskItem

I've created a custom approval worfkflow for an listitem. Now I need to see the values of the item in the taskitem. So I think one way would be to attach the ListItem to the TaskItem. Does anybody ...
2
votes
1answer
1k views

Adding SPListItem using SPWeb.ProcessBatchData method

I am looking for adding SPListItem using SPWeb.ProcessBatchData method. Could any one please help me on syntax for adding list item to my custom list.
0
votes
0answers
18 views

Existing list items not showing added new columns to add values

I have created a list in SharePoint 2013 with 3 columns and added 2 items to that list. Later I have added 2 more columns to the list and its content type. But when I try to edit the existing 2 ...
0
votes
2answers
48 views

Redirect after deleting a list item

I have a requirement wherein I have to redirect the user to the homepage, after a list item is deleted. Right now, the corresponding list is shown after the deletion. How can I accomplish this? I ...
0
votes
0answers
31 views

Why is file still locked after successful SPFile.ReleaseLock()?

I want to lock a file, perform some operation on it, then unlock it. This is what I have so far (I do this in an item event receiver for ItemUpdating): try { ...
1
vote
2answers
39 views

Replacement for Item Level Permissions

I have a SharePoint calender list and where i have given item level permissions for each event through designer workflow using the impersonation step. But now on the production site the number of ...
0
votes
1answer
23 views

get value from splistitem

I'm face to a strange issue. I get an splistitem with a caml query ->that's ok and validated with caml query builder. After that, i'm try to get the title or any other meta of the item. Here is how ...
0
votes
6answers
3k views

Value does not fall within the expected range. But the field exist

I have the following problem. I have a list with a custom content type, when programmatically I want get an information from my SPListItem I get the following exception: Value does not fall within the ...
2
votes
2answers
436 views

Unable to update list item - Additions to this web site have been blocked

I am developing a SharePoint job. In the public override void Execute(Guid targetInstanceId) method, my code goes: SPSecurity.RunWithElevatedPrivileges(delegate() { int count = ...
0
votes
1answer
962 views

Looking for a way to replace the File in an SPListItem

I have implemented a system for publishing documents from a document library to a Document Centre. This uses a Send To Connection set up with the "Move and leave a link" option. When this is used the ...
0
votes
2answers
63 views

Load more list items on scroll

I am showing the first 5 list items on the page (in one div). Div has vertical scroll bar. I want to show the remaining 5 items on when scroll goes down end. I am using CSOM to fetch list items. Any ...
0
votes
1answer
29 views

Where does a list item go when it is deleted using Server Object Model?

Assumptions: I have a custom SharePoint list with 2 items in it. In one case i delete one item from the list manually and check the recycle bin,here i find the deleted item. Now in the second case i ...
1
vote
3answers
2k views

Why SPListItem.Update doesn't trigger workflows?

I have a workflow with Start Option "Start workflow automatically when an item is changed" and I have code that execute SPListItem.Update(), but this update doesn't force workflow to run execution. ...
1
vote
1answer
70 views

Alternative to CSOM ListItem.get_item

The only way I know to load a sharepoint list via Javascript is to load it and on the current list item: var value = currentItem.get_item(columnTitle); I want to be able to load an item and on the ...
2
votes
1answer
174 views

“User cannot be found.” Error While Updating List Item

I'm experiencing a weird error while trying to update the author and editor on some files in a site, but not all, and the behavior is strange and inconsistent. The code: SPListItem item; int newID; ...
2
votes
4answers
2k views

Randomly: Item does not exist. It may have been deleted by another user

I have a rather curious issue with some workflow tasks. My (state machine) workflow creates a handful of tasks while running. Users interact with the tasks to move the workflow between its states. ...
0
votes
3answers
65 views

Print / display list items on page

I am using SP2010. Using client object model in the CEWP (Content Editor Web Part), I can give alert for each item title. But I want to print all list items on the page. I tried with document.write() ...
1
vote
1answer
72 views

Sharepoint list items getting auto modified

Sharepoint list items getting auto modified. All the lists seems modified by a single user. But when checked with the user, he hasn't accessed this list at all. And the modified time stamps are all ...
2
votes
2answers
116 views

“nativehr” error while trying to delete list items through ProcessBatchData

Plain and simple, I'm trying to delete a massive amount of items from a list as quickly as possible using a c# app, and have seen references to batch processes being the best way to do this. Not ...
0
votes
4answers
164 views

Need to have a default word document inside a new item form for every list item

I Have a requirement for having a word document in each and every list item that i create. Suppose i click on new item in sharepoint list, the new item form must contain an embedded word document by ...
1
vote
2answers
204 views

Populate a list of links through powershell

I have my webapp, my webs and a list created. My point is that I would like to populate my lists with values at the time of my deployment, which is done thanks to a powershell script. So I would like ...
2
votes
1answer
55 views

SPListDataValidationException in an event receiver on a task list with Overdue tasks

I have a task list called Finance Department Tasks on this task list i have created an item updating event receiver which checks if all fields in the task list are filled and then sets the task status ...
0
votes
0answers
29 views

Unable to copy the Enterprise Keywords to the other list item

I have a picture library in which there is an event receiver which will copy the item value to the other picture library. There is one column i.e. Enterprise Keywords in the picture library. I have ...
2
votes
1answer
125 views

loop splistitem in folder in powershell

I'm trying to loop all splistitem in a folder of a library. I can get my library and have folder but i'm not able to get the items inside the folder. When i display the listitem for folder, i've the ...
1
vote
3answers
534 views

Do I need to do an update after set permissions on a listitem in the ItemAdded event receiver?

I have an event receiver on itemAdded. I set some permissions like below. SPRoleAssignment role = new SPRoleAssignment(spPrincipal); ...
0
votes
2answers
430 views

The SPListItem provided is not compatible with a Publishing Page

Whenever I try to save og check in mmy Home.aspx pagelayout welcome page I get Invalid SPListItem. The SPListItem provided is not compatible with a Publishing Page. And this: ...
0
votes
0answers
89 views

Archive or Move files based on a given Created Date range to another Library Using PowerShell

I am trying to archive select files from a SharePoint 2010 document library by moving them to another library. The files to be moved are selected based on their created date within a given time span. ...
1
vote
0answers
76 views

Move listitems in SharePoint Hosted app

I am trying to creating a SharePoint 2013 Hosted app that get a selected listitem and move it to another folder of library in the same web. When I debug my code everything runs without any problem. ...
0
votes
2answers
3k views

add value to text field in list with ItemAdded event receiver

i have a textfield in a list, that i want to fill with custom text when a item is being added. nothing happens when i try to debug it, the breakpoint in the method is never reached. Please can ...
1
vote
3answers
945 views

SharePoint 2013 Webpart - Multiple file upload

I want to add the multiple files functionality to my custom webpart in C# .NET 4.5. I want the same functionality as the out of the box multiple files add feature when you create a list item via the ...
1
vote
2answers
327 views
0
votes
1answer
160 views

Copy ListItem from one list to an other by ribbon custom buttom

I try to create a new button in the ribbon. When the person select a list item and click on this button this item will be copied to another list. CommandAction=""javascript: var context = ...
0
votes
1answer
23 views

Workflow queueing

I have a large list that needs to have every item in it updated nightly, with several fields recalculated and so forth. Currently it is updated en masse overnight by an application I wrote that is ...
2
votes
1answer
268 views

Exception when getting the value of field in SPListItem

Hi Guys I have this problem: I query a list using Caml. items = list.GetItems(query); This returns 6 items and works ok. Then I do: foreach (SPListItem item in items) { var title = ...
2
votes
5answers
1k views

List Item Timeout

I am trying to open/close the a custom list item with 11500 items but I am getting an error which seems to be a timeout error, i checked the logs and found 'Unable to execute query: Error 0x80131530'. ...
1
vote
4answers
2k views

How to delete an item on ItemAdding

I want to performe some Action on ItemAdding. I have a Custom List that reacts on Item Creation. In particular on Item Adding performs some action using the After Properties.. If, at this level, i ...
2
votes
3answers
91 views

SPServices is the Document Checked Out SP2010

I was wondering if anyone knew how to tell if an item has been checked in or out from SPServices? I am able to get all of the nodes but I do not see one which captures the checkout. Is there a way ...
5
votes
3answers
104 views

SPList.GetItems(view) vs SPList.GetItems(query)

Which solution from the two is the most efficient one: 1. Using SPList.GetItems with a given view as a parameter 2. Using SPList.GetItems with a given query as a parameters and then retrieving from ...
3
votes
1answer
188 views

SPListItemVersionCollection - iteration performance

This question is related to my issue described here: SharePoint 2010 Performance troubleshooting On SP 2010: Does anyone knows if there is some performance limitations while using ...