Opening document in another db from a viewpanel

Apologies for posting again but I am really struggling with this

IO have a viewPanel which retrives documents OK from a different (non xPages db)

How can I make the view column a link that will open the document in it’s native database? What would the syntax of the notes:// url be (bearing in mind the db is in subdirectories on the server). Various things I have tried give me “remote pathnames must be relative to the data directory” or “document not found in linked-in database”

or is there a simpler solution to configure a viewPanel row entry with a target for an onclick event?

Many thanks

Mike

Subject: Link to it like you’re not using XPages…

  • First, open your browser and determine what URL causes any document to open in the other DB. Domino’s web server has restrictions on what db you can and can’t open from the current one, so this will not only tell you what URL to use, but if you hit one of those restrictions you should become aware of that during this step.

  • On your XPage do a SSJS event and create an XSPUrl, or simply do context.getUrl() to fetch the current one. The XSPUrl object has methods to set the server, path, and it makes it trivial to add or remove individual URL args. When you’re done be sure to print (.toString); so you can check the server console to be sure you’ve generated the correct one.

  • When you’re happy with it, replace the print with context.redirectToPage(.toString());

  • If you’re doing all this with CSJS then build the URL the same as always, except you set a CSJS event instead of a SSJS event, and fetching DOM data is a lot simpler because of the helpers in dojo.

Hope this helps…

P.S. I don’t know how to set a SSJS event on a viewPanel column because I don’t use viewPanel. I’m sure there are numerous posts about how to get a link on a viewPanel to do something, which should be usable as a model to do the above.