Representation of a list item within the SharePoint API.
2
votes
1answer
64 views
Unable to update list item - Additions to this web site have been blocked
I am developing a SharePoint job. In the public override void Execute(Guid targetInstanceId) method, my code goes:
SPSecurity.RunWithElevatedPrivileges(delegate()
{
int count = ...
2
votes
1answer
129 views
Get Notified on List Item Changes - not using email
I'm searching for an easy way to display the latest changes of a sharepoint list.
Situation: one huge list (10k entries) with a lot of daily changes (lets say 100).
Target: Display the changes during ...
2
votes
1answer
119 views
How to import one single row of data from excel to one list item in a SharePoint 2010 list?
I have a problem where we want users to attach a file to a new item and the SharePoint list will automatically read on row or column of data (maybe 20 cells-worth of data) and populate some additional ...
2
votes
0answers
457 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 ...
2
votes
2answers
444 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
161 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
3answers
3k 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
2k 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
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 ...
1
vote
2answers
311 views
How to add a blog post programmatically?
I'm trying to create a C# script that will allow me to import blog posts from a different system (exported as CSV) into a SharePoint blog. I have found a script for comments to a blog post, but I'm ...
1
vote
2answers
149 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 ...
1
vote
2answers
335 views
ListItem Versioning Differences
Does anyone know how to programmatically determine if any non-system fields have changed between ListItem versions? I realize that I could iterate through the fields between each version and if I see ...
1
vote
2answers
309 views
Updating an SPListItem without knowing SPSite or SPWeb
I'm building a custom web part that is running an SPSiteDataQuery. I will be running this query across all site collections, and displaying the results, together, in 1 web part. Users interacting with ...
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 ...
1
vote
2answers
4k 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
1
vote
2answers
573 views
How to programmatically restart a workflow
I have a workflow linked to my list. Is there any programmatically way to select a list item and restart the associated workflow?
Something like:
SPListItem item = List.Items.GetById(1);
...
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 ...
1
vote
3answers
932 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 ...
1
vote
1answer
506 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 ...
1
vote
2answers
177 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?
...
1
vote
1answer
713 views
Export-SPWeb with Where Clause to filter List Items?
I am trying to export list items to a local folder but I only want certain items, not the complete list.Is this possible?
I have tried to iterate through the SPListCollection with the "Modified" ...
1
vote
4answers
813 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
2answers
1k 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.
1
vote
2answers
705 views
URL : How to add multiple Query String within Source Query String?
I have a simple question regarding the &Source Query String in SharePoint 2007, which normally SharePoint used in on List Item page, when click on "Close" button, it can redirect back to the ...
1
vote
2answers
112 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
1
vote
2answers
894 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
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
3answers
662 views
Exporting SPList
I'm iterating SPWebs and SPLists. When those lists fulfil specific requirements, I would like to export the lists in code, and later import them to another SharePoint environment (using code).
How ...
1
vote
1answer
93 views
What is the difference? (Checked out files)
I am in the process of writing a powershell script to work with checked out files and I stumpled on this article: Find All Checked Out Files
My question is what is the difference between the two ...
1
vote
1answer
64 views
Do I need to do an update after set permissions on a listitem in the ItemAdded event receiver?
I have an event receiver on itemAdded. I set some permissions like below.
SPRoleAssignment role = new SPRoleAssignment(spPrincipal);
...
1
vote
1answer
80 views
How do I get the current Editor of an Listitem while ItemUpdating?
How can I get the current Editor of an list Item in SharePoint 2010 during ItemUpdating?
Problem is properties.AfterProperties["Editor"].ToString() throws and Exception cause it's null. This ...
1
vote
1answer
94 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 = ...
1
vote
1answer
285 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 ...
1
vote
1answer
841 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 ...
1
vote
1answer
191 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
199 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
106 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 ...
1
vote
1answer
542 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 ...
1
vote
3answers
846 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 ...
1
vote
2answers
1k 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. ...
1
vote
1answer
356 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 ...
1
vote
1answer
371 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
3answers
1k 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.
...
1
vote
1answer
291 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?
...
1
vote
1answer
922 views
How to get checked out SPListItem for current user by file name using CAML query?
I use SharePoint 2010 RTM and now I'm trying to get SPListItem, which was checked out by current user, using code like this:
query.Query = "<OrderBy>" +
...
1
vote
0answers
34 views
send email to users including alert template with list items using visual studio?
I don't want to set list alerts when items created or changed.
I want to send email(including alert template and all fields in item) to that user which not configured in sharepoint.
My function for ...
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 ...
1
vote
0answers
52 views
Get SPListItems based on contribute permissions, programmatically
I have a problem in getting the list items the current logged user has contribute rights on.
I have this scenario:
List A has read permissions for anonymous access.
Group 1- Has contribute rights ...
1
vote
0answers
139 views
Can I set SPListItem Item.Id programatically
I want to delete some list items and recreate them using a csv file. I can see if I delete the items and then recreate, Sharepoint adds it's own auto icrement int. what if I want a set of fixed values ...
1
vote
0answers
115 views
SPSiteDataQuery without subfolder items?
I'm trying to use the SPSiteDataQuery to return the contents of several lists across a site collection. The problem I'm having, though, is that while there are only a few documents at the root level ...



