2

Is there a way to launch (open without saving) an attachment through XPINC? Something like the popup in web browser that ask you whether to open the attachment using a program or just save it first. Or maybe there's some setting in the notes client that I've yet to found that will launch an attachment?

I tried to built my own file download control so that I can built the URL to directly launch the attachment. It consist of a repeat control bounded to the attachment field and just a link control within it with URL computed as curRow.getHref()

And that worked fine but still it ask for me to save instead of launching the attachment directly. Changing the above code to curRow.getHref() + "?Open" also yield the same result. Any workaround?

user1409217
  • 412
  • 11
  • 29
  • try this: http://techdriveactive.blogspot.co.at/2012/11/open-attachments-in-xpage-in-client.html#!/2012/11/open-attachments-in-xpage-in-client.html – Michael Saiz Jul 08 '13 at 11:04
  • @MichaelSaiz I've tried the code and the result is the same as mine previous code. I've used the code before which is because of the difference of attachment URL in Notes Client than web browser. It still doesn't prompt me to directly open/launch an image, pdf etc using the appropriate program OR if I just want to save it but view it later. – user1409217 Jul 12 '13 at 00:59

1 Answers1

0

The only way that I could find to do this was to construct a notes url that opened a conventional Notes form that had the launch property "Launch First Attachment" and only a single attachment.

It worked well but is obviously limited to documents with a single attachment. It also prevents the form from being opened as xpages by default but that is usually manageable.

You could construct documents on the fly and open them but that seems rather clumsy.

This is the formula for my XPage link in a repeat

var repIDVar = database.getReplicaID();
"notes://"+@Name("[CN]",@Subset(@DbName(),1))+"/"+repIDVar+"/0/"+rowData.getUniversalID()
Sean Cull
  • 503
  • 3
  • 17