-
Search
-
Archive
June 2012 M T W T F S S « May 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
Tag Archives: List Item
Maintain SPFile version comment and last modified date when moving documents
In overview the strategy is one of replaying history. Each version of the file is reposted to the document library. The comment and last modified date is handled with a combination of SPFile.Checkin() and SPListItem.Update(). Intrigued? Then read on….
Posted in SharePoint, SharePoint 2007, SharePoint 2010 | Tagged List Item, Properties, SharePoint | Leave a comment
SharePoint dates
You would like to think that SharePoint records the Creation and Modification dates for each item once only. Wrong! Take a document in a document library. The item is seen as both an SPListItem and an SPFile. The created and … Continue reading →
Posted in SharePoint, SharePoint 2007, SharePoint 2010 | Tagged List Item, Properties, SharePoint | Leave a comment
Content type added to a list does not appear on the New Menu
I’m not sure if others have encountered this behaviour when progammatically adding a content type to a list. In the following code I am adding a content type to a list and ensuring that it appears on the new menu, … Continue reading →
Posted in .NET Development, SharePoint, SharePoint 2007, SharePoint 2010 | Tagged Content Types, Error, List, List Item, SharePoint, SharePoint 2010 | Leave a comment
When using the ItemUpdated and ItemAdded events is the only choice you have.
Let me explain by way of an example. You have implemented a custom insitu EDRMS solution which will set the permissions on an item to ‘Readonly’ when the item’s Item Status column is set to a value of ‘RECORD’. In making the item … Continue reading →
Posted in .NET Development, SharePoint, SharePoint 2007, SharePoint 2010, Tips and Tricks | Tagged Event, List Item, Performance, SharePoint, Workflow | Leave a comment
Never use SPList.Items.GetItemById(ID)
NEVER EVER use List.Items.GetItemById(ID) or List.Items[ID] Use List.GetItemById(ID) instead. Under normal conditions when there are relatively few items in a list then all will seem to go well. However, as time goes by and the list item count increases then … Continue reading →