Home
TeamSite
url link for Worksite documents
cmorton89
We are using WorkSite for SharePoint and need to have url links to view certain worksite documents. The one I use right now only shows a particular version. I would like it to show the most recent version and can't figure out how to alter this link. Does anyone have any ideas?
http://portal.advancedrad.com/WorkSite/scripts/viewdoc.aspx?latest=0&nrtid=!nrtdms:0:!session:dms:!database
MS:!document:93162,2:&ext=1&ishtml=1&command=ok
Find more posts tagged with
Comments
dabird
I have good news and bad news. The bad news is this isn't supported in any present versions of WorkSite Web. The good news is that thanks to many of you who have asked for this feature on DevNet, we've implemented it for 8.5. The other good news is that there is a workaround for 8.2.x that requires a bit of coding.
You need to create your own custom HttpHandler that would reset the moniker before passing the request to ViewDoc.aspx. Below is an overview of what you would need to do.
Create a custom HttpHandler and register it in WorkSite Web's web.config. Let's call this Latest.aspx.
Inherit from AutenticatedHttpHandler inside your Latest class. This will allow you to hook into the existing WorkSite Web session without any additional authentication coding.
Inside your class' ProcessRequest method, get the IManDocument object corresponding to the moniker passed into the query string. Then you just use the object model to identify the latest version's moniker and redirect to ViewDoc.aspx with the appropriate moniker.
Point your URL in SharePoint to Latest.aspx instead of ViewDoc.aspx.
If you need help on the implementation details, please review the DevNet webcast
A Primer on WorkSite Web Customizations
. In this webcast, I specifically explain how to create your own custom HttpHandler. And if you get stuck, feel free to drop me a line.
Regards,
dabird