Representation of a list item within the SharePoint API.

learn more… | top users | synonyms

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 ...
0
votes
1answer
312 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 ...
1
vote
1answer
115 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
3k 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: ...
0
votes
0answers
584 views

SharePoint 2010 Announcement web part - truncate/char limit issue

There are old threads on this topic but most of them for MOSS or prior versions or without any resolutions. This thread is close but solution doesn't work for me. Feel free to forward any working ...
1
vote
1answer
568 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
345 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. ...
0
votes
1answer
1k 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 ...
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 ...
0
votes
1answer
1k views

Automate exporting SharePoint list 2010 items to Excel 2010

I found this Import Sharepoint List into Excel Using VBA Only that people have been successfully using to automate the exporting SharePoint 2010 list items to Excel 2010. Currently I m also using web ...
0
votes
1answer
692 views

Best way to check if SPListItem have been publish, on an ItemUpdate EventReceiver

I have an EventReceiver associated to DocLib template id, triggered at every ItemUpdate. Everytime an SPListItem is publish I want to execute my code. (Required check out and Content approval are ...
3
votes
1answer
858 views

Setting the DisplayFormURL of a CalendarView item to an absolute URL, SPCalendarView control

Background: I have a WebPart that makes use of the SPCalendarView control and in it I add items (events) dynamically from different Calendar lists from multiple sites. like this (please note that I ...
1
vote
0answers
134 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. ...
0
votes
3answers
5k views

How to retrieve File version from SPListItem

I'm trying to get file versions from an an SPListItem... I tried in many way, looping on SPListItem.Versions or SPListItem.File.Versions, tring to return my byte stream.. I can retrieve file info's, ...
3
votes
4answers
1k 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. ...
3
votes
2answers
6k views

How do I get the url for attachments on an SPListItem using C#?

I have an SPListItem for which I would like to get the urls of all its attachments. The urls will be used as part of my custom web part which has an SPList of SPListItem items.
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 ...
6
votes
2answers
8k views

Fastest way to retrieve an item by title?

Currently I am using a foreach loop to find the item I want by its title using the following code: SPList list = web.Lists.TryGetList("DocumentLibrary"); foreach ...
1
vote
3answers
3k views

Possible to load a SPListItem from the item url?

I have a FullTextSqlQuery that is returning the URL for a list item. I would like to create a new SPListItem object from that URL. Is there an easy way to do this, or will I need to peel apart the ...
0
votes
1answer
347 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"]
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 ...
5
votes
3answers
10k 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 ...
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 ...
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. ...
0
votes
1answer
964 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" ...
1
vote
1answer
507 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 ...
0
votes
1answer
626 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 ...
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 ...
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 ...
0
votes
1answer
458 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 ...
4
votes
3answers
4k views

How to get SP.Folder for SP.ListItem in SharePoint 2010 JavaScript Client Object Model?

I have a custom button on ribbon for document library and need to disable it if current SPListItem is an empty folder. To disable button I use EnabledScript attribute of CommandUIHandler. I can get ...
1
vote
0answers
497 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
992 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 ...
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 = ...
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 ...
2
votes
1answer
332 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 ...
3
votes
1answer
615 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
212 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
226 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
487 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 ...
1
vote
2answers
210 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? ...
0
votes
3answers
1k views

ArgumentException with Export-SPWeb Lists

PS C:\Users\Administrator> Export-SPWeb "http://win-oql2facn6h8/" -itemurl "List s/Disney" -path "c:\Backups\disney.cmp" Export-SPWeb : ...
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 ...
2
votes
1answer
903 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 ...
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 ...
1
vote
3answers
2k views

Item name / title when creating a folder

I am trying to create a list item with a folder content type by setting it's content type id to a folder content type id. The folder is created successfully but the title is set as 1_.000, 2_.000 etc. ...
8
votes
2answers
699 views

Is it possible to create a “Link to a Document” in a Document Library using a CAML Batch Command with UpdateListItems?

I have a Document Library in WSS 3 which has the "Link to a Document" content type enabled, and I want to use a batch command (via lists.asmx updatelistitems) to create a series of links. Here is the ...