Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Open document and immediate check-out

  Asked By: Carter    Date: Nov 23    Category: Sharepoint    Views: 2185

I have an issue on developing a Sharepoint solution. The idea is to click the document and immediatly check out the document without using the context menu. This document needs then to be copied into a draft folder. Once the document is finished in the draft folder is needs to be copied back to the original folder.
The problem is in the first part. There is no event handler when directly opening the document.
I have tried implementing msdn.microsoft.com/.../...ntextMenu_SV01068564.asp where save & check-out is immediatly done in the context menu but apperently this fails.
When directly opening the document as far as I can see the onclick triggers DispDocItemEx that will open the document.
Any ideas or articles on how to solve this problem?



2 Answers Found

Answer #1    Answered By: Brooks Bond     Answered On: Nov 23

We did something similar, we wanted to log the event. We popped the
following code at the end of the function DispDocItemEx in ows.js
and redirected to a writeviewevent.aspx page, parse the url to get
the document  name and then via web service check-out  the document.

var objSrvHTTP;

objSrvHTTP = new ActiveXObject("msxml2.xmlhttp.3.0");
//var WinSettings
= "center:yes;resizable:no;dialogHeight:300px";
//var ref = "/./_layouts/1033/WriteViewEvent.aspx?href=" +
("GET","ServerName/WriteEvents/WriteViewEvent.aspx?href=" +


Answer #2    Answered By: Gregg Wilkinson     Answered On: Nov 23

Sorry to bother you but is it possible to send me the code of the writeviewevent.aspx page and give me some explanation how the webservice is referenced. I'm rather new at this.

Didn't find what you were looking for? Find more on Open document and immediate check-out Or get search suggestion and latest updates.