Representation of a list item within the SharePoint API.

learn more… | top users | synonyms

1
vote
1answer
133 views

Check user read access to a particular list item

I need to check if a user has read level access to a particular list Item. What would be the best approach 1) listItem.DoesUserHavePermissions(currentUser, SPBasePermissions.ViewListItems); //here ...
0
votes
1answer
2k views

Programming to retrieve list items in a SharePoint list using Javascript

I have requirement which is Retrieve List Items in a List(list created through OOB) Display those list items on the sharepoint site by binding to repeator control Using javascript and client object ...
0
votes
1answer
1k views

How do I update a list item using REST and Data.js?

I want to write a simple SP hosted app that edits a single list item in a list in the app web. Getting the list item collection is fine. Then I want to pass the result to a function that changes the ...
1
vote
1answer
89 views

Potential memory leak with SPListItem?

I have created a Timer Job that iterates through a list of 100,000 items and finds the ones that are older than 120 days and "moves" them to a new site collection for archival. I am using a ...
0
votes
2answers
472 views

Update Editor (Modified by) for publising pages

I am trying to create about 1000 publishing pages using powershell. The powershell script reads data from a xml file. I have to update Modified By field for all newly created pages. I have used ...
0
votes
0answers
57 views

Get SPListItem by title is very slow

I want to get a SPListItem by title. I´m using a caml query to filter the list (Around 1000 items). There is only 1 item with the title in the list. My problem is now that the performance is really ...
0
votes
2answers
132 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
215 views

Why ItemUpdating is calling after ItemAdded event in Sharepoint-2010?

I am developing Sharepoint 2010 application where I have been using SPItemEvent to deal with ItemAdded event. One thing surprised me that ItemUpdating event is calling after ItemAdded event in List. ...
1
vote
0answers
82 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. ...
1
vote
3answers
1k 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 ...
0
votes
1answer
96 views

Add additional user information to SPList as list column

I have a List Tickets with a field Client. This is a user from our AD and displays the name of the user. We now need to display the country and the location the user resides in to additional fields. ...
0
votes
0answers
33 views

list items in KPI page is overlapped with KPI page

I have created a KPI list in sharepoint 2013.In this list i have open menu option,it is shown by three dots like ... When i click on it a list is open,but this list items are overlapped with KPI page ...
1
vote
2answers
372 views

spfielduservaluecollection.remove not working

I want to remove the user from the list item from the column of type person or group and it is multi-valued. My code is: private void DeleteUserFromList(SPUser userDeleted, string ...
0
votes
1answer
1k views

How to read managed metadata value from SPListItem

I have a list in which there is one column which stores the Employee Department and it is of type Taxonomy field and it is stored in the user profile property. I want to get the display value of that ...
0
votes
2answers
67 views

SPCopyDestinationCollection.Add() Method Does Not Persist to the Database

I'm attempting to run a basic PowerShell script to fix a lot of broken "Send To" destination links that resulted from a site migration from one farm to another. I wanted to proof-of-concept this on ...
0
votes
0answers
29 views

Hide Field on Specific SPListItems

I am trying to figure out if I can hide/show a field for specific list items using the SP object model. I am aware that you can set the SPField.Hidden property however it appears as though this does ...
0
votes
5answers
2k views

Unable to get values in Item Added event receiver

I have created an event receiver which will be executing after the item is added to the list. I want to make the sub site based on the values entered in the list. My event receiver code is: ...
1
vote
1answer
454 views

Working with taxonomies via PowerShell: Removing a tag from an item

So I have a term store created and populated with terms, and I'm writing a script to retroactively tag items. During preliminary poking around, I found I can successfully tag an item with simply ...
0
votes
1answer
725 views

The field you are trying to update may be read only error while adding item to list programmatically

I am adding a list item in from an application page which is redirected from web part page. My code is : protected void Page_Load(object sender, EventArgs e) { SPSite site = new ...
0
votes
0answers
27 views

How to create Custom ListItems Template/ user control

In WPF, you can create a "List Item" template and have a list-box use this template for every item in the list. I would like to do the same in SharePoint 2010. Can anyone point me in the right ...
1
vote
2answers
347 views

Enterprise Keywords (TaxKeyword) Error: Value does not fall within the expected range

I am only trying to retrieve the value of the Enterprise Keywords column in my SPList. I do this by: if(item["TaxKeyword"] != null) Log(item["TaxKeyword"].ToString()) The only way I can find to ...
0
votes
3answers
45 views

Good solution for individual list for each user in the intranet?

I want to display items on webpart that the user have created and also can delete the items. Whats a good solution for this? I was thinkin of creating a regular list that contains all of the items and ...
0
votes
1answer
268 views

Document Library items not updating via UI or code. System metadata (last modified, modified by, etc.) updating

I am having a strange issue with one of my Document Libraries. It is the document library created by the publishing feature "Documents." Here are the symptomps and what I have done so far. Any help ...
0
votes
2answers
586 views

ItemEventReceiver - ItemDeleting not working with a document library and referencing list

I have a custom list that has a GUID column which refers to the UniqueId of a document in a document library. Every time I upload a document, it should add an entry in this list and populate the ...
0
votes
1answer
229 views

Which of these is the best way to get a list item collection?

Performance-wise which of these methods is the best way to get a list item collection, and why? SPList list = web.getlist("listurl"); SPListItemCollection items = list.getItems(query); ...
1
vote
2answers
391 views

SPListItem.Attachments - what type cast?

When iterating through a SPListItems SPAttachmentCollection what type cast am I supposed to use? SPFile or SPFileStream or something else? I want to display the item's filename and when it was ...
0
votes
0answers
463 views

C#: cannot get listitem field value but works fine in powershell?

back again with a strange issue. Using powershell I can get a handle on a SPListItem and do Item["My Field"] which prints its value. However, in a C# custm workflow activity, when I attempt to do ...
0
votes
1answer
209 views

Getting the properties of an item through web services

Is it possible to get the SPListItem.Properties property of an item through one of the out-of-the-box API web services in SP 2013?
1
vote
2answers
1k views

Unable to update item using powershell when event reciever is enabled

I have a powershell script that I am using to update some list items programatically. It seems to work as I expected when I disable the event reciever that is associated with the list however when I ...
2
votes
1answer
2k views

How to check if user has read/write permission for a SPListItem in c#?

In my SP2010 visual webpart, I am checking permissions with the code below. Basically the current user is either an admin or a regular user. If they are an admin, they need to have permission to edit ...
1
vote
2answers
223 views

Deleting all items from a list and then adding new items will not give the new items id 1,2,3 etc

I have a list with 3 items. When I delete these 3 items and add new items they get ID 4, ID 5 and ID 6. But I want the new items to get ID 1, ID 2, and ID 3. Is there any workaround? This is how I ...
0
votes
1answer
109 views

Read from an excel Sheet and write to a List

My requirement is that, i need to upload data from an excel sheet to an existing sharepoint List in SP 2010.I will have 2 different Lists Like this. Then I need to compare Both the List and retrieve ...
0
votes
4answers
128 views

SPListItem.Delete() has some issues

I have a list which consist of more than 5600 items. In my application i will search all the items from particular date range by using SPquery. As the result of the SPQuery, the splistitem collection ...
1
vote
1answer
333 views

Delete List Items Using PowerShells with Date Filtering

I've been trying to delete more than 10,000 list items in SharePoint using PowerShell. So far, this is what I've had [System.Reflection.Assembly]::Load("Microsoft.SharePoint, Version=12.0.0.0, ...
0
votes
2answers
588 views

Save conflict when trying to update a listitem

In my SPItemEventReceiver I have two methods one ItemCheckedOut and one ItemUpdated. In the ItemCheckedOut I update one listitem column. In the other one I do some other updates to the listitem. ...
0
votes
1answer
92 views

Best way to update 200 items on a list [closed]

Situation in a VS2010/SP2010 site: List A with main items List B with subitems, having a lookup column that points to List A ID There are about 200 subitems for each item The Page where users edit ...
0
votes
2answers
315 views

Inserting new list items into SQL

When I add new item into the list, I have to insert the items into the SQL database. How can I do it? Any clue is good for me.
2
votes
2answers
848 views

Adding list item when user does not have permissions question

I am trying to programmatically add a list item to a SharePoint list. The code works fine when executed by a user with contribute permissions, but does not work when a user has view only. Funny thing ...
0
votes
2answers
113 views

How to Upload Documents using Visual Fox Pro

We have an application written in foxpro, part of the application is creating reports (basically excel and pdf files), i would like to add the capability of uploading those files to a sharepoint list, ...
0
votes
1answer
108 views

OnWorkflowItemChanged fire multiple times

I have been using a State Machine workflow (SharePoint 2010). Workflow design Main State: The Main State does not update the item. The Main State contains a OnWorkflowItemChanged. When the item ...
0
votes
0answers
240 views

Object refenrece not set to instance of an object - list template items

This may be a duplicate, because this error is pretty common in every part of sharepoint. However, the search function didn't find anything for my particular problem. To the problem: I have a List ...
0
votes
2answers
333 views

Populate list item from XML feed

How to create new list item using data from XML feed? Is it possible to handle multi line of text in XML feed?
0
votes
1answer
43 views

MOSS 2007 stripping out URL in SPListItem

We have a SharePoint List with a multi-line text column. In this column we have HTML code. When I retrieve the column in an SPListItem, the url is often stripped from the string. If the SharePoint ...
2
votes
2answers
142 views

Dates and times in Properties vs Fields

I'm trying to roll my own archiver for SharePoint. I always try to let the underlying object serialize itself. Only when it fails do I try to use .ToString(). Anyway, while inspecting the Properties ...
3
votes
1answer
169 views

Get actual item from SPRecycleBin

Similar to this question, I need to permanently delete only specific items from the recycle bin. I need to know more than just their names, however, and SPRecycleBinItem seems to have only have a ...
0
votes
2answers
213 views

add SPListItem with more than one field of data

I want to add an item to a SharePoint task list, with data in the Title, AssignedTo, and Status columns. The code below adds the item with data in the Title column, but no data in the other columns. ...
0
votes
1answer
165 views

Programmatically adding a sequence number to the 'Title' column during item creation in SP List

As per the title above, I have a list that stores IT support requests. I need a sequence number that matches with the item ID and I want to add this sequence number to the Title of the request. I ...
1
vote
0answers
118 views

send email to users including alert template with list items using visual studio?

I don't want to set list alerts when items created or changed. I want to send email(including alert template and all fields in item) to that user which not configured in sharepoint. My function for ...
2
votes
0answers
81 views

Bulk file upload creates multiple versions of all files except last file

I have an interesting (well to me anyways) problem here. I am doing a code based mass upload of documents into a SharePoint library with a twist. The twist is that the file's last modified date ...
0
votes
1answer
155 views

Set SPBuiltInFieldId.WorkflowInstanceID value

I start worklfow programmaticaly on SPListItem (custom ContentType). When i try to save all fields but "WorkflowInstanceID", its ok. But, item[SPBuiltInFieldId.WorkflowInstanceID] = ...