Tagged Questions
0
votes
1answer
53 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
47 views
SPListItem.Update Not working
So I have this really simple function which updates a couple of fields on two different lists (one is a document library)
The thing is on the document library does not updates any of the fields I need ...
0
votes
2answers
271 views
Sharepoint 2007 Powershell: $item.update() gives error that file has been modified
I am trying to programmatically update some metadata for a sharepoint item using powershell. Here is my code:
$web = getWebByURL("http://test-site/spadmin/")
$itm = $web.lists["Documents"].items[0]
...
2
votes
2answers
69 views
Getting latest datetime from a splist
I have sharepoint list with data and one of the columns contains date ... how can i programmatically retrieve the latest date, the field is a Date And Time type?
2
votes
2answers
47 views
Retrieving the highest value from list
My question is regarding retrieving a value from a sharepoint list. Basically I have a list with some data. One of the fields in the list is a text field with numbers.
So what i want to do, i want to ...
1
vote
1answer
33 views
An event to be fired on editing a file
As title says, I need an event to fire when a listitems file has been edited.
I appreciate this isn't as simple as it having it's own event, which is why I've tried to make use of the itemupdating ...
0
votes
2answers
164 views
The impact of BreakRoleInheritance()
I call BreakRoleInheritance on a document (the actual list item) in order to assign someone of less permissions the 'contribute' rights to that particular item. In doing that, have I 'broke' the ...
1
vote
0answers
61 views
SPListItem.Tasks always empty
I have a custom sharepoint (2007) list (named testlist) on which I attached a test workflow (built with sharepoint designer 2007 and named testwf), which only task defined in the 'Actions' section at ...
2
votes
1answer
88 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
0answers
52 views
Possible to have multiple rating controls for multiple items on one page?
On my page I have a repeater - and I have a list of documents (list items) bound to this repeater. For each item bound, I would like to include to the OOTB SharePoint rating control. And, obviously, ...
2
votes
0answers
455 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 ...
4
votes
0answers
74 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 ...
1
vote
0answers
96 views
SPListItemVersionCollection - iteration performance
This question is related to my issue described here: SharePoint 2010 Performance troubleshooting
On SP 2010: Does anyone knows if there is some performance limitations while using ...
2
votes
2answers
443 views
Attach ListItem to TaskItem
I've created a custom approval worfkflow for an listitem. Now I need to see the values of the item in the taskitem. So I think one way would be to attach the ListItem to the TaskItem.
Does anybody ...
2
votes
1answer
509 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?
4
votes
1answer
196 views
Get SPListItem from LINQ
I have used SPMetal to create a data context. I can query my lists. The queries return an object of the type of list that they are in. Is it possible to convert this type into a normal SPListItem ...
1
vote
1answer
526 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 ...
0
votes
1answer
144 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
1answer
99 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
2answers
2k 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
804 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 ...
2
votes
1answer
701 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 ...
1
vote
2answers
109 views
Modifying ID (index) of listitems
So I ran into a situation where I have two lists containing the same information but in different languages (don't ask me why they chose to do it this way).
Each item links through a workflow-created ...
1
vote
6answers
2k views
ArgumentException when trying to access SPListItem value
I have a tool to update all items in SP (link replacement). The tool works most of the time but sometimes it throws me an ArgumentException ("Value does not fall within the expected range.").
Here is ...
0
votes
2answers
1k views
Need Help - How to update listitem of type User in sharepoint 2010?
I am trying to update a list which is having User content type field, where I am saving users name selected from people picker.
Now my requirement is to add/remove a particular person in that list ...
9
votes
2answers
7k views
Safest way to get a date from Sharepoint into a C# datetime field, using object model?
If I have a Sharepoint list item with a date field.
How can I get the field value populated into a c# datetime object?
For example:
DateTime validfrom = Convert.ToDateTime(item["validfrom"]);
...
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 ...
6
votes
1answer
2k views
Attach a file to the list item
I attach file to the list item when it updating and when new item added. Additional condition when item updating - if the file already exists, remove it and replace the new.
I receive events ItemAdded ...

