0
votes
0answers
70 views

Why is file still locked after successful SPFile.ReleaseLock()?

I want to lock a file, perform some operation on it, then unlock it. This is what I have so far (I do this in an item event receiver for ItemUpdating): try { ...
1
vote
2answers
48 views

Replacement for Item Level Permissions

I have a SharePoint calender list and where i have given item level permissions for each event through designer workflow using the impersonation step. But now on the production site the number of ...
6
votes
3answers
115 views

SPList.GetItems(view) vs SPList.GetItems(query)

Which solution from the two is the most efficient one: 1. Using SPList.GetItems with a given view as a parameter 2. Using SPList.GetItems with a given query as a parameters and then retrieving from ...
0
votes
1answer
202 views

Bestway to store and manipulate SPListItemCollection results

I get a SPListItemCollection in my program. I use this collection to show the items in a DataGridView display. I need to filter items based on a requirement. But .Add() or Delete() does changes to ...
1
vote
1answer
88 views

Potential memory leak with SPListItem?

I have created a Timer Job that iterates through a list of 100,000 items and finds the ones that are older than 120 days and "moves" them to a new site collection for archival. I am using a ...
0
votes
0answers
56 views

Get SPListItem by title is very slow

I want to get a SPListItem by title. I´m using a caml query to filter the list (Around 1000 items). There is only 1 item with the title in the list. My problem is now that the performance is really ...
0
votes
2answers
67 views

SPCopyDestinationCollection.Add() Method Does Not Persist to the Database

I'm attempting to run a basic PowerShell script to fix a lot of broken "Send To" destination links that resulted from a site migration from one farm to another. I wanted to proof-of-concept this on ...
0
votes
0answers
29 views

Hide Field on Specific SPListItems

I am trying to figure out if I can hide/show a field for specific list items using the SP object model. I am aware that you can set the SPField.Hidden property however it appears as though this does ...
0
votes
1answer
718 views

The field you are trying to update may be read only error while adding item to list programmatically

I am adding a list item in from an application page which is redirected from web part page. My code is : protected void Page_Load(object sender, EventArgs e) { SPSite site = new ...
0
votes
0answers
27 views

How to create Custom ListItems Template/ user control

In WPF, you can create a "List Item" template and have a list-box use this template for every item in the list. I would like to do the same in SharePoint 2010. Can anyone point me in the right ...
1
vote
2answers
346 views

Enterprise Keywords (TaxKeyword) Error: Value does not fall within the expected range

I am only trying to retrieve the value of the Enterprise Keywords column in my SPList. I do this by: if(item["TaxKeyword"] != null) Log(item["TaxKeyword"].ToString()) The only way I can find to ...
0
votes
1answer
266 views

Document Library items not updating via UI or code. System metadata (last modified, modified by, etc.) updating

I am having a strange issue with one of my Document Libraries. It is the document library created by the publishing feature "Documents." Here are the symptomps and what I have done so far. Any help ...
1
vote
2answers
388 views

SPListItem.Attachments - what type cast?

When iterating through a SPListItems SPAttachmentCollection what type cast am I supposed to use? SPFile or SPFileStream or something else? I want to display the item's filename and when it was ...
0
votes
1answer
109 views

Read from an excel Sheet and write to a List

My requirement is that, i need to upload data from an excel sheet to an existing sharepoint List in SP 2010.I will have 2 different Lists Like this. Then I need to compare Both the List and retrieve ...
0
votes
1answer
92 views

Best way to update 200 items on a list [closed]

Situation in a VS2010/SP2010 site: List A with main items List B with subitems, having a lookup column that points to List A ID There are about 200 subitems for each item The Page where users edit ...
0
votes
1answer
107 views

OnWorkflowItemChanged fire multiple times

I have been using a State Machine workflow (SharePoint 2010). Workflow design Main State: The Main State does not update the item. The Main State contains a OnWorkflowItemChanged. When the item ...
0
votes
2answers
510 views

How to display list item attachment to a user without permissions on the list

I have sharepoint list/library. Only admin user has permission on this list. Now i want to display attachment to all authenticated user in my custom web part. How can i achieve this functionality.? ...
0
votes
1answer
350 views

Proper way to evaluate/get status of boolean field when looping through SP List with code

What is the best way to do this when looping a list? I have tried to evaluate it with something like this but it wont let me evaluate bool as an "if" condition if (item["ShowTitle"] == true) //do ...
0
votes
1answer
256 views

Double value in URL from SPListItemCollection result

I have a basic list which I am using to generate a "Quick Links" menu WebPart. It looks ok but for some reason the URL field (of URL type) when rendered renders html that looks like this: <a ...
1
vote
1answer
226 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 ...
0
votes
2answers
202 views

Adding extension methods to SharePoint types

Heads up, this is very much a beginner question. My SharePoint experience is primarily with working with SharePoint designer and powershell. I've never touched Visual Studio or anything to use custom ...
0
votes
1answer
644 views

Update custom property on listItem using -replace in powershell?

I have two different web application with one site collection each. One Site collection is privat and the other on is public inside the intranet. The public site links to the private site which link ...
1
vote
1answer
466 views

Set data to Sharepoint Gridview from List and remove appropriate selected columns

I am using c# and I have a SPList with fields such Title and Translation. I want to set Word and Translation into SPGridview. I can retrieve data from my List: string translation = ...
2
votes
1answer
653 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 ...
3
votes
2answers
786 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 ...
1
vote
1answer
265 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
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 ...
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
0answers
565 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 ...
3
votes
1answer
330 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
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. ...
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
2answers
436 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 ...
3
votes
6answers
4k 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 ...