0
votes
0answers
74 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
3answers
5k 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: ...
0
votes
1answer
1k views

Looking for a way to replace the File in an SPListItem

I have implemented a system for publishing documents from a document library to a Document Centre. This uses a Send To Connection set up with the "Move and leave a link" option. When this is used the ...
6
votes
2answers
2k views

SPListItem.SystemUpdate updates SPListItem.File.ModifiedBy

As can be seen from the debug image when I call SystemUpdate(false) of a SPItem, that SPItem's File object's ModifiedBy attribute changes to "SHAREPOINT\system". Sorry, it's a bit weird way to ...
0
votes
1answer
301 views

Copying a document between libraries breaks QuickParts

I am copying a file between 2 libraries which contain the same fields. So basically the source library serves as a template library. After the file is copied i update the field values in the ...
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 ...