1
votes

I am trying to build a URL to access the attachment in a document in Lotus Notes.

According to IBM lotus notes document, the url to access to an attachment in browser will be like this: notes://server/db/view/document/$FILE/filename

The document said view could be view name or view id, document could be document id or document name. I know how to retrieve document UNID in a view. But I don't know how to get the view UNID. I tried to use the view name but no luck. It does not work.

I am not running any lotus scripts.

Actually, my final goal is to export all documents in a view to a spreadsheet. And build URL for attachments for each row. I am using @Text(@DocumentUniqueID) to get the doc id.

But not sure how to get view id.

3

3 Answers

4
votes

The url should start with http://. Otherwise it will open the document in Notes client.

View name should work. Use the view name visible in Designer not the view title.

In case the view name has special characters (like spaces) add an alias name to view without special characters and use this alias name.

As an alternative you can use "0" as view ID.

Of course you can get the view id without programming: just open the view in browser. You see the view id in URL then.

0
votes

You could use this class to export your view to Excel: http://blog.texasswede.com/export-notes-view-to-excel-with-multi-value-fields/

Then you just calculate the URL in one of the columns in the view:

"http://www.example.com/" + @WebDbName + "/0/" + @Text(@DocumentUniqueID) + "/$FILE/" + filename

0
votes

To get the view unid without programming, you can open the Domino Designer and then the view list. Without opening a view, you can highlight the view in the view list, then look for the 'properties' pane/section. Open the 'Document IDs' tab and there you will find the UNID, NoteID and some other details for the view.

Of course, these can change, so either a 'db.nsf/0/...' or a specific view name, 'db.nsf/vwfiles/...' view name is preferable (as noted elsewhere).