| Nick's profileSharePoint DevelopmentBlogListsNetwork | Help |
|
|
August 31 Checking out a file on behalf of another userOver week or two I have been busy creating a custom sequential SharePoint Workflow using Visual Studio 2008. The client requested that a new Document Workspace be created if a user were to select a custom link I added in the EditControlBlock in the dropdown menu for an item in a Document Library. The steps are as follows:
Step 4 was proving to be quite difficult due to the fact that when you call SPFile.Checkout() in the SharePoint object model, it will always check the file out as the system administrator. After trolling the various forums I managed to nail down this one method. Every SharePoint object created and action taken after the impersonatedSiteCollection will be made under the context of the user that activated the workflow. This way the original user has control over Checkin/Checkout going forward. TrackbacksThe trackback URL for this entry is: http://customsharepoint.spaces.live.com/blog/cns!41D760DBB8E4E638!185.trak Weblogs that reference this entry
|
|
|