Representation of a list item within the SharePoint API.

learn more… | top users | synonyms

1
vote
2answers
22 views

RegEx to validate and replace invalid file name characters from a custom web part file upload control

Scenario: I have a fileupload control in my custom webpart that attaches the uploaded files to the list item. The attachment code is given below: private void UploadAttachments(Helper ...
0
votes
0answers
10 views

Sharepoint list forms (NewForm.aspx) from 2010 to 2013

We have recently migrated our contents from SharePoint 2010 Foundation server to a new SharePoint 2013 Foundation server.Everything went fine and even the custom list forms(NewForm.aspx,EditForm.aspx) ...
0
votes
1answer
50 views

SSOM Embed Code when inserting list item

Clicking this button in the list's ribbon, I can properly embed HTML so SharePoint doesn't strip anything out. I have some HTML that I need to insert into a list item field via C# code. How do I ...
1
vote
1answer
18 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 ...
0
votes
0answers
12 views

CSOM timeout when attaching file to list item

I am attaching files to list items and encounter the following error message: The operation has timed out. Looking at the files that throw this exception, I see that they range in size from ~7MB to ...
1
vote
1answer
27 views

ThreadAbortException on SPWeb.ProcessBatchData

I am trying to update ~2000 list items with SPWeb.ProcessBatchData. After exception on all items at a time, I tried them in small batches like 100 and 200 but after executing first 1 or 2 batches i.e. ...
0
votes
0answers
8 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
1answer
35 views

CustomSolution Error - Object reference not set to an instance of an object

atm I'm implementing a custom solution in our SP 2010 farm to receive emails on an specific custom list. With the following code it's possible to add one entry, with an email-body contains one line ...
1
vote
2answers
39 views

Problem with bulk items insert in SPList (works fine for 200 but not if item exceeds )

var itemArray = []; for (var i = 0; i < data.length; i++) { var items = data[i].split(","); downloadID = items[0].trim(); noOfDownloads = items[1]; ...
0
votes
1answer
573 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
1answer
562 views

Get List Item Version History for each item if specific field was changed

I have a list that has versioning turned on. Three of the fields are multi-line text boxes which have appending turned on. I want to iterate thru each item in the version history and look for ...
0
votes
1answer
48 views

REST to get list item by Id

I am always comfortable using JSOM, and I have used less of REST calls to access lists and its Items. But now I have a requirement to use only REST to get item by its ID. Is there any code snippet ...
1
vote
2answers
59 views

Update current item [duplicate]

I am trying to update current items, but all items in the list get updated why? public override void ItemAdding(SPItemEventProperties properties) { using (SPWeb web = ...
2
votes
1answer
55 views

Update readonly field using REST API

I am trying to update a list item using Rest API. Following is my code. It works and it updates all fields except "RichMessage" which is a Note field with RichText="TRUE" and readonly. I have tested ...
0
votes
0answers
15 views

ItemAdding Event check for manually unpublished [duplicate]

I am uploading a document to a SharePoint library, (drafts lists). When I publish the document it gets added to the startpage of the document. When I then what do Unpublish the document the ...
0
votes
3answers
47 views

Update listitem problem

i am trying to update a listitem in a event receiver on FeatureActivated in a document library. public override void FeatureActivated(SPFeatureReceiverProperties properties) { ...
0
votes
0answers
15 views

How to avoid character limit when uploading document via VB app?

We have an in-house application that, among other things, generates an Excel spreadsheet and then uploads it to a document library on a SharePoint 2013 site. I sent the developer the UNC path to the ...
1
vote
7answers
4k 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 ...
0
votes
1answer
15 views

Re-Deploying SharePoint List removes all the submitted ListItems

I created a SharePoint List using Visual Studio 2013 and deployed it. Later I had need to add few more columns in the List. So after adding more columns when I deployed it again then what I realized ...
0
votes
1answer
17 views

Want to create a navigation bar from list item which redirects to another page or document

Navigation bar should get populated from List items(Hyperlink items) that maps to pages or another document. Share Point 2010
0
votes
0answers
20 views

Set the validation message of sharepoint list item column

I have a list with a mandatory field title. I have hidden the default button and added my own custom button to save the item. I am using the code below to save the item which works fine but it does ...
0
votes
3answers
50 views

PowerShell Script to retrieve every and only List / Library items in a specific view in SharePoint 2010

I am trying to iterate over each item in specific view for a list in SharePoint 2010. What i have so far works to return items in the view, but only the items in the first paginated view for that ...
1
vote
2answers
739 views

The SPListItem provided is not compatible with a Publishing Page

How can I save or check in my Home.aspx pagelayout? Whenever I try to save or check in my Home.aspx pagelayout welcome page I get the following error. Invalid SPListItem. The SPListItem provided is ...
0
votes
3answers
75 views

Retrieving ContentType from SPListItem is NULL

I am trying to get the ContentType.Name of the Event (SPListItem) however it is NULL when I try to access it. I'm getting a value for the ContentTypeID, so I would assume that I would be able to ...
0
votes
0answers
11 views

Renaming a file with Event Receiver [duplicate]

I need to rename a file in a document library with an event receiver, so that the URL will not have %20's. Basically the File name or File path needs to be stripped of spaces. The problem I'm having ...
0
votes
0answers
37 views

Renaming a file with ItemAdded Event Receiver

I am using an Event Receiver to rename a file in a document library. For some reason this doesn't seem to work. public class EventReceiver1 : SPItemEventReceiver { /// <summary> /// An ...
1
vote
1answer
38 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) { ...
0
votes
1answer
19 views

Creating a TimerJob that renames files

I have been tasked with figuring out how to rename files that are coming into SharePoint. We have an External list that does not have pictures stored as blobs or even images within the SQL Database ...
1
vote
0answers
23 views

Close modal after form have “saved”

Im trying to trigger a page reload after my editform is done. I know that I can create a js function, "presaveitem". But this is called before the item is saved. I need to trigger some custom JS ...
9
votes
2answers
119 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
0answers
49 views

SPContext.Current.ListItem randomly returns null (custom form)

I have noticed this once pushing the current code to production. following is the code under ddlEnWipeReason_SelectedIndexChanged (inside the update panel): using (SPSite curSite = new SPSite(csURL)) ...
0
votes
3answers
283 views

item adding event receiver failes to trigger in bulk items inserting

Currently am developing an item adding event in event receiver for a custom list. The list is updated using datasheet view, usually by adding bulk items (ex : 50 items ) to list using datasheet view. ...
2
votes
1answer
56 views

SystemUpdate() in list item update

What's the advantage/reason for using SystemUpdate() over Update() when list data update?
0
votes
2answers
4k views

How to get an SPListItem from a Search Query Programmatically

I'm querying my Search Server and getting some results... How can i get the SPListItem linked to that object? I tried with many ways, but every method fails.. Here's my code: string ...
2
votes
1answer
74 views

Get all list items versions from client side

I am trying to get all versions from every item in a SharePoint list using only client-side through a web part. Following the exemple at ...
0
votes
1answer
332 views

Error:Access denied. You do not have permission to perform this action or access this resource

I am retrieving items from SP lists. But when I try to deploy my solution through VS 2013 it says Access denied. You do not have permission to perform this action or access this resource. ...
0
votes
1answer
204 views

Show list items in AngularJS ng-grid

retrieving SharePoint list items by REST with var app = angular.module('myApp', ['ngGrid']); app.controller('MyCtrl', function ($scope, $http) { ...
0
votes
1answer
19 views

Date value retrieved from an item keep on increasing every few seconds

I was trying to retrieve items from a SharePoint custom list called "Some Events" using JSOM. Title, Venue, EventDate were few fields I was retrieving. Every thing worked fine except EventDate. ...
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.
0
votes
2answers
536 views

Getting an ItemCount with filtering in SP2013 using REST api

I am attempting to return an integer (itemcount) of the items within a SP2013 list. I have done this easily using the stock standard json method. However I have a need of counting the splist items ...
1
vote
1answer
149 views

Refresh parent page after closing list item dialog

I'm trying to refresh the parent page of a list when closing the dialog of a list item. Is there a way to achieve this with javascript somehow? I inspected the button in the DOM and tried to write ...
0
votes
1answer
20 views

Check Child Items When Parent Status Column Is Changed

What is a good strategy to prevent a change on a parent item in a SharePoint 2010 list if a related child item (i.e. the child of the parent) column is set to open? For example, I don't want to allow ...
0
votes
2answers
66 views

Redirect at the end of event itemupdated

I'd like to know if there are a way to make a redirection in an event receiver of a list itemUpdated and not updating. I need this because in my event, i create a file in a folder and of a document ...
3
votes
1answer
287 views

Add New List Item With Attachment Via Excel VBA

I have users that have a schedule template in Excel (2010). I'm wondering how I can code via Excel VBA to create a new list item and attach the Excel worksheet they are using that contains the ...
0
votes
2answers
104 views

Unable to cast object of type 'Microsoft.SharePoint.SPListItem' to type 'Microsoft.SharePoint.SPFile

In code below, at mentioned line I am getting this error: How I fix this? SPList docLib = WSweb.GetList(WSweb.ServerRelativeUrl + "/Documents"); //SPList docLib = WSweb.Lists.TryGetList("Documents"); ...
1
vote
2answers
255 views

How to foreach through a list and get distinct values from specific columns C#?

I'm able to loop through a list on sharepoint and get the information I need from selected columns, but how would I loop through a list and get only distinct values from a column in C#. For instance ...
1
vote
2answers
350 views

How to detect SPFieldLookupValue from an SPListItem?

I have a SPListItem, with different fields (string, lookup, etc), that I have to iterate them and do different actions depending of the type. How can I detect if value is type String or type Lookup? ...
3
votes
3answers
3k views

Find creation time for list elements (including documents)

I know SharePoint has some hidden fields for list items. I need to check the timestamp for when a list element was created, is this possible? The reason is I must allow the item to be edited for the ...
3
votes
2answers
6k views

How to read a User field value for a list item

I've got a content type that contains a filed of the type user. When I want to read the ListItem I just get a string containing the users name instead of a object which contains Name, Username, E-Mail ...
0
votes
1answer
816 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 = ...