Representation of a list item within the SharePoint API.

learn more… | top users | synonyms

0
votes
1answer
267 views

How to delete a specific item from a list

I have writen the following code that should delete some items from a list on the current site, but it must contain some error and it currently doesen't work as expected. protected void ...
0
votes
3answers
320 views

Change the value of Author field

I am copying over items from one list to another list. After copying the "Author" field gets populated with "System Account" and so I wish to update some fields in the destination list as follows. I ...
0
votes
1answer
519 views

selected SPListItem in the current list

how to get the selected SPListItems in the current SPList ? I thought I would find a helping property like this: SPListItemCollection mySelectedItems = ...
5
votes
2answers
3k 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" argument(s): ...
1
vote
1answer
134 views

difference between item[] and item.fields[]

I want to retrieve let's say the title field of my item so what's the différence between doing these acces methods : SPList myList = properties.List; string mytitle1 = ...
0
votes
1answer
214 views

SPFieldCollection TryGetFieldByStaticName bug?

I had expected that if TryGetFieldByStaticName succeeds and returns a value, there would be an SPField in the item that has a static name equal to what I used in the TryGet... call, but no? I.e. can ...
1
vote
1answer
724 views

Odd and Even list item color

i saw a sharepoint where its list item as a background color (blue) for odd list item number and another (white) for even numbers. I dont know where i can set this. I looked into designer and i could ...
0
votes
1answer
160 views

Sharepoint List Event raised when a current view is changed

Is there a event which is raised when current view of a SharePoint list is changed. For example the current view displays all items in the list and now the user selects a different view say Added by ...
0
votes
1answer
217 views

DataformwebPart outside of List folder and ListItemID from another Query string parameter not working

I've tested this before, but I can't seem to get it to work again. I've got a Doc library with webpart pages. Create a new page and in SPD add a CustomListForm to a custom list in display mode. I ...
2
votes
1answer
135 views

Why do I have 2 ways of retrieving an average rating? Which one do I choose?

It appears that, on enabling social rating against my list for my custom content type, I now have 2 extra fields for each SPListItem in my list: AverageRating and RatingCount (as explained Blog Link) ...
0
votes
1answer
234 views

How to Get List Values From Sharepoint 2007

I am looking for a way to get list values from SharePoint 2007. Right now I am using PowerShell, and have the following script: #load Microsoft.SharePoint.dll ...
2
votes
1answer
1k views

SPListItem item[“Author”] throws ArgumentException on blog lists only for some users

We have a webpart on our SiteCollection home page which aggregates the most recent posts from a number of blog subsites. The code looks like this: using (SPSite site = new ...
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
4answers
368 views

Object ref not set to instance of object in SPListItem extension method

I am attempting to write an extension method for the SPListItem type to ease the pain of getting SPUserValues as strings. I am getting an "Object reference not set to an instance of an object" ...
2
votes
0answers
603 views

Url to an item with Client Object Model

Regarding my question, at this moment i'm writing some client object model code and I can't find a way to retrieve create make an url ... My question now is: How can I create an url to an item? I ...
1
vote
1answer
108 views

Disable save item button while save process is not completed

User clicks on Save Button and saving procedure can take "few" seconds. User can click again..that`s why i need to disable save button, how can i do this?
0
votes
2answers
610 views

How to copy a Lookup field to another lookup field on another list?

I have this script which creates a new site (SPWeb), which is based on a template. I will the copy the data from the main list into the new list on the new site. Both list is based on the same ...
5
votes
4answers
18k views

How to set ListItem Lookup Field value

How do I set a ListItem's Lookup field using code? SPFile file = list.RootFolder.Files.Add(destUrl, iStream, true); SPListItem item = file.Item; item["DocumentID"] = DocID.ToString(); ...
0
votes
0answers
41 views

Submit data into repeating table in infopath to a sharepoint list [duplicate]

Possible Duplicate: How to submit data from repeatable table in infopath form to a sharepoint list? I am trying to solve this problem of pulling data into a repeating table, then having the ...
0
votes
1answer
117 views

Pass an SPListItem into an external web service as a parameter?

Can you pass an SPListItem object as a parameter into a custom [WebMethod] deployed into SharePoint? I understand that it would be essentially disconnected from the the SharePoint context if it was, ...
2
votes
0answers
121 views

Is my Object Casting Model acceptable?

I'm creating a SharePoint application, and am trying some new things to create what amounts to an API for Data Access to maintain consistency and conventions. I haven't seen this before, and that ...
3
votes
1answer
765 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 ...
0
votes
2answers
491 views

Retrieve selected list item title

Is there a way to retrieve the selected list item title/name? For example if I click an item say "Distributor" in custom list, how can I get this title in a string or variable?
2
votes
1answer
564 views

Parse pasted images from Outlook emails as attachments in Sharepoint list

I have a Sharepoint list with incoming email enabled, and an email event receiver to create items out of incoming emails. Once an email is received, it sends an email back to the sender with the ...
4
votes
0answers
81 views

Can you add comments to an append-only field in a list in Sharepoint 2010 using C#? [duplicate]

Possible Duplicate: Can you programmatically add comments to an append-only comment field in a custom item list using C#? Posted on stack exchange first, then I found this Sharepoint ...
0
votes
1answer
1k views

How do I use a variable in CAML query to send approriate email

I have created two list. One is "Storage" the other is "Approvers" I am able to retrieve all values in the column 'System' in the "Storage" list by iterating through the column list, like so and ...
1
vote
0answers
855 views

List ItemUpdated Event not firing when updating item from code

I have a problem with my eventreceiver. It is set to fire on updating item from a list, and works very good when I update that item from Sharepoint's web UI. However I have some code that goes through ...
1
vote
2answers
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. ...
4
votes
3answers
8k 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
246 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
278 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
117 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
171 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
228 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
4k 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: ...
1
vote
1answer
764 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
122 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
283 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
180 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
111 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
546 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
292 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
1k 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 ...