Representation of a list item within the SharePoint API.

learn more… | top users | synonyms

5
votes
3answers
9k views

Cannot get field value of list item through JavaScript

I try to get the value of a list item (that is currently selected). I know that I must load it into the context but even with loading the field explicitly I get the following message. Microsoft ...
1
vote
1answer
263 views

Disable approvement for a single listitem

I am creating a custom list in Visual Studio 2010 for SharePoint 2010. I want to set "approvement needed" for single listitems to false or disabled. My intention is, that a element can be approved ...
1
vote
1answer
322 views

Checking if list exists client-side

I'm developing a Silverlight web part and can't use server-side objects like SPList. I normally get items from a list called "Locations" which has two fields - "Title" and "WOEID". The problem is I'd ...
1
vote
1answer
124 views

How to push a specific SPListItem through a workflow with code?

I would like to push a specific SPListItem to the final step in a State workflow, skipping all the intermediate steps (if a certain checkbox is checked). Currently, I have an event receiver hooked ...
2
votes
1answer
1k views

Updating a SPFieldMultiLineText field

I have an SPListItem. I have a field on the item of type SPFieldMultiLineText. How can update the value of that field?
0
votes
1answer
180 views

Getting Sharepoint Users and comparing them with SPList field

I have a Custom SPList that has a field "Assigned To", now I can add as many items as I want, and they can have same title and same User they are assigned to, but what I want is a script so that I ...
1
vote
4answers
1k views

Returning a SPListItem in conjunction with RunWithElevatedPrivileges

* *Clarification. Application == Site Definition. Direct Database access is out the window ** I've created an application for SharePoint that utilizes some new approaches to coding List Access. I've ...
1
vote
0answers
229 views

Validate list item with javascript API

I want to develop a custom datasheet view to edit a list. I add item through the javascript API. The problem is that the service doesn't control fields value. For example : - I add an item with a ...
1
vote
3answers
5k views

Getting specific SPFile from document library

I have a Document Library called "x" with file named "y". I am curious what the best way to get the SPFile object for the specified SPListItem. Currently I am using this: ...
2
votes
1answer
894 views

Getting User details from field “AssignedTo” in a custom List

I have a Custom List, which have different fields, when I click on any user in field "assignedTo" it navigates me to another window and I can see user's Account, Name, email etc. I am able to get all ...
1
vote
2answers
124 views

Sharepoint list event

Is there a event which is raised when permission of a sharepoint list item is changed. For instance permission is granted or revoked on a list item
0
votes
1answer
2k views

Adding List Item Programmatically

I am working in SharePoint 2010.I am dynamically creating a list on FeatureActivation event. My list has following columns Title : Text , VisibleTo: User/People, Menu : Choice, Type : Choice. ...
0
votes
1answer
302 views

SharePoint OM wont' read item property

I have a list item with one field Classes which is a multiple choice lookup. I want to implement an ASPX page which contains a ListBox which is filled with values from the Classes field. The following ...
2
votes
1answer
184 views

SPListItem update yields ItemUpdated/ing Numbering Scheme not found

I've written a console app that searches items in a SP document library (MOSS 2007) for a specific condition and updates the value in a column for each item that meets the criterion. I run the console ...
1
vote
1answer
114 views

Specific number of fields based on the difference of two date fields

Number of fields = DateField2-DateField1 Generate Number of fields based on the difference of those two fields. Possible? Sharepoint 2010 List Overview: I'm working on a financial project tracking ...
0
votes
3answers
2k views

Get Sharepoint data synchronously with JavaScript

I was wondering is there some way to get list items form SharePoint with JS synchronously. All methods I've found required to specify a callback method. As I am building a custom JS validation for ...
0
votes
2answers
1k views

How to get value from TexonomyField in Sequentail Workflow for Document Library?

I am create Sequential Workflow for document library in Visual Studio 2010 and also create Meta Data Column Field which field name is TexonomyType. first ways i get TexonomyField like this: ...
1
vote
1answer
565 views

Customize AllItems.aspx

I have a list "Projects". Each ListItem stores which users are working on that project. I have 2 groups within SP - "ProjectManagers" and "ProjectMembers". Now I want to customize AllItems.aspx ...
3
votes
1answer
325 views

Caching SPListItems with Permissions

I have a versioned list that I need to cache list items for. The effect of which being: If a user has permission to view non published items the cache can return the item pending approval. ...
1
vote
2answers
2k views

How to get List Item from sharepoint list based on ItemID

Dynamically I am adding radgrid to the page. I need to retrieve list item from the SharePoint list. Say I have 10000 items in the list using SPQuery, I will get filtered records as 2000 items. Here ...
1
vote
3answers
2k views

Getting “Object reference not set to an instance” but column name exists

The NewsCaption field exists (both display and internal name is NewsCaption). I even saw it exists when I went to watch window and show this field listed in the SchemaXML for the fields element. I am ...
2
votes
1answer
2k views

set separate url and description for URL-field via javascript

I've got a list item with a field of type URL. As you know, an URL-field consists of two parts: a description and a URL. Using javascript to update a field that consists of one part is easy, you ...
2
votes
3answers
2k views

Attempt to get property CheckOutType of SPFile cause 'System.NullReferenceException' exception

I have a strange situation: If the "Require Check Out" and "Create Major Versions" options are switched on for the current Document Library, then when I try to get the CheckOutType property I receive ...
1
vote
0answers
132 views

SPListItem: get associated eml file

I have a discussion board set up with an email drop folder. Once an .eml file is copied into the drop folder, it would disappear and the new discussion/message would be added to my discussion board. ...
3
votes
4answers
962 views

What is the best way to retrieve random item?

I would like to retrieve random item from SharePoint list. I have these approaches: Get random index and use list.items[randomIndex]. But I think that I retrieves all items from DB in this case. ...
1
vote
1answer
492 views

How to handle the ecb menu CSS?

I have hidden the ECB menu from the task/DocLib lists, and I am using jquery to truncate the title field into 50 char and remaining will be displayed in the jquery popup. Even though I have removed ...
2
votes
1answer
3k views

How to read an 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 ...
7
votes
3answers
2k views

Multiple Lookup field , how to return better deliminators using object model?

I have a multiple lookup field, and when I do this: string myValue = oItem["MyLookupField"]; I get this string back: [id];#[displayText];#[id];#[displayText] or a real example: "5;#C3;#15;#P3" ...
0
votes
1answer
322 views

Do you need to use the {} brackets when grabbing an field by the GUID

When trying to grab a field by guid, do you need to surround the guid with {}? E.g. field["{xxx343-xx-324-xxx}"] or field["xxx343-xx-324-xxx"]
0
votes
2answers
3k 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 ...
3
votes
2answers
3k views

Invalid SPListItem. The SPListItem provided is not compatible with a Publishing Page

Whenever I try to save or publish or check in the web-interface, I get this error. The test-environment did not have this issue, and I've only added a single web part to the page and tweaked the CSS ...
3
votes
2answers
6k views

Set default value in a document library column via Powershell?

I'm looking for a powershell script that allows me to set the default value for a column in SharePoint. Thanks
2
votes
2answers
1k views

Can an event receiver update a list item before the alert email is sent?

I have a requirement to expose a list item's ID value on the "DispForm.aspx" form and all alert emails for a particular list. SharePoint is very "protective" of its IDs (or counter fields) and it ...
2
votes
1answer
894 views

Search Optimization on SPListItemCollection

I have an SPListItemCollection (Thread Discussion Collection) that consists of almost 20,000 items. Each SPListItem (Thread Discussion) on the SPListItemCollection contains a sub SPListItem(Thread ...
0
votes
1answer
943 views

How to execute code for custom menu action?

I have a custom menu action, declared like this: <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <CustomAction Id="ConvertListLevel" ...
6
votes
2answers
2k views

SPListItem.SystemUpdate updates SPListItem.File.ModifiedBy

As can be seen from the debug image when I call SystemUpdate(false) of a SPItem, that SPItem's File object's ModifiedBy attribute changes to "SHAREPOINT\system". Sorry, it's a bit weird way to ...
0
votes
1answer
445 views

Change a list item's “Manage Copies” destination URL programmatically

I'm trying to write a PowerShell script that goes through every item in a document library and updates the "Manage Copies" destination URL to a new location. Is there any way to achieve this ...
0
votes
1answer
620 views

Is there a property to get all subitems/subfolders from a SPListItem?

I need to find out how many subitems and subfolders a SPListItem has. The fields ItemChildCount and FolderChildCount are no solution for me, because they only count the folder/item directly beneath ...
1
vote
0answers
490 views

Problem with Refresh button on External data column

I'm struggling with refreshing items on list with external data. So far I have been able to make the refresh button work, but only when I add items to list in a standard way (via browser). When I add ...
0
votes
3answers
1k views

Sharepoint 2007 - Multiple Lines Text Size

I am using SharePoint List to capture values from the form. How many characters does multiple lines text field supports in sharepoint custom list? It asks me how many lines, while creating the ...
2
votes
2answers
941 views

How to find a file with name = X in a SPList

Looking for recommendations. Have a file in a document library with name x.txt. In a workflow code behind, I need to get the file to read its contents. What is the best/most efficient way to do ...
2
votes
1answer
325 views

Duplicates of SPListItem when two quick requests occur

We got code, running on page load. That code asks certain SPList for its items by CamlQuery, which gets only items with specific (current) user in one field (field A) and with some value in other ...
0
votes
1answer
1k views

Summary Task in Task List - Display Name

Hello I have a Task List, and I want to add items to it programaticaly in C#. I have a problem with adding a summary task. Now I figured out how to add such item: var myList = ...
1
vote
2answers
209 views

GetItems(cQuery)

The following code seems to be working. Basically, I have multiple items in a document library and I need to run a cleanup PS. Do I need to add Dispose as I am not running under the Using context? ...
3
votes
1answer
602 views

How can I make sure that only one of two fields is filled out (ListItem)?

I have custom SharePoint list with several fields. Two of the fields are TargetPage and ExternalURL. At the moment the user is allowed to fill out both of them if he want to, and I want to deny that. ...
1
vote
2answers
209 views

Is it possible to update the searchindex for only one item?

Is it possible to update the searchindex for only on specific item. I'm search some tasklists through keywordsearch and showing them in a webpart. Then I have a custom action which changes the status ...
4
votes
2answers
3k views

Locking SPListItem for entirely server-side update

I am using code similar to the following to apply an update to an SPListItem, after necessarily elevating to System privileges on said item. Because this can be called multiple times for the same ...
0
votes
1answer
219 views

SharePoint 2010 - Read list item from Central Adminstrator list

I have created list (say List1) on Central Administration Site. I would like to read the title value from that list programmatically. How can I do it? I don't want to hard code the URL of central ...
1
vote
1answer
479 views

retrieving form values from NewForm.aspx?source=/_layouts/blah.aspx

I'm building a system that shows a list's NewForm.aspx to an anonymous website visitor, which they can complete and submit. The URL to the form includes "?source=/_layouts/blah.aspx", so after the ...
6
votes
1answer
2k views

ItemUpdated event handler runs four times

I have a list in the rootweb, and a list in a subweb. I want to update/add when something changes in an item in the subweb. This method is invoked in an ItemUpdated event receiver. The problem is that ...