[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Cannot open existing attachment

Posted on 2007-10-03
12
Medium Priority
?
231 Views
Last Modified: 2013-12-18
Experts,
       I have lotus notes client system that I need to convert to web and there are existing attachment on the documents created through the client. Problem is that first there is no icon for the attached and second it cannot be opened.
Thanks!
0
Comment
Question by:aentice
  • 6
  • 6
12 Comments
 
LVL 22

Expert Comment

by:Bill-Hanson
ID: 20009631
There is probably a hidden field on your form called "$V2AttachmentOptions" that is set to "0".  This is the setting that we use to hide attachments via a web browser.  If that field is there, removing it should allow you to see the attachments on the web.

That said, I still hide mine and provide a better looking interface by using @AttachmentNames and urls cunstructed to target the individual files.

http://Host/Database/View/Document/$File/Filename?OpenElement

See the Designer help topic "URL commands for opening attachments, image files, and OLE objects" for more info on File URLS.
0
 

Author Comment

by:aentice
ID: 20009675
I dont have a $V2AttachmentOptions on the document. The attachments already exist, so how can I add @AttaachmentNames without changing or disturbing the attached files.
0
 
LVL 22

Expert Comment

by:Bill-Hanson
ID: 20009759
The first thing to determine is where the attachments really are stored and how the Notes application is managing them.

(1) They could be attached directly to the NotesDocument is which case, they should display via a browser unless the original programmer hid them.

(2) They could be attached inside a RichText field in the NotesDocument.  This is a bit trickier since the RichText may include hide-formulas.

(3) They could be attached to a related record.

You'll need to interrogate the design of the system to determine exactly where the files are being stored.  I could explain how to use @AttachmentNames to build a better interface, but we need to know where the files reside first.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:aentice
ID: 20023132
The attachment is attached to the document and is not referenced by any other related-record.
Answer is #2 --- it is a rich text field with no hide formulas.
0
 
LVL 22

Expert Comment

by:Bill-Hanson
ID: 20023852
Try adding a <Computed Text> element to the form with this code:

dbUrl := "/" + @ReplaceSubstring(@Subset(@DbName;-1);"\\":" ";"/":"%20");
strViewAlias := @ReplaceSubstring(@Subset(@ViewTitle; -1); " "; "%20");
viewName := @If(strViewAlias != ""; strViewAlias;  "$DefaultView");
docUrl := dbUrl + "/" +viewName  + "/" + @Text(@DocumentUniqueID);
"[<a href='" + docUrl + "/$File/" + @AttachmentNames + "'>" + @AttachmentNames + "</a>]"

This should give you links to download the file(s).
0
 

Author Comment

by:aentice
ID: 20024612
0
 
LVL 22

Expert Comment

by:Bill-Hanson
ID: 20024737
My example above creates a relative link, not an absolute one (and therefore does not require a protocol or server to be part of the URL).  Where did the "http://" come from?  That was not in my code.
0
 

Author Comment

by:aentice
ID: 20024830
In my document I have this code in the HTML Head content
n1 := @NewLine;
vPath :=@WebDbName;
n1 + "<base href=\"http://" + Server_name + DBPath + "\" />" + n1 + "<META http-equiv=Content-Type content=\"text/html; charset=iso8859-1\">" + n1
This might be the cause, I got this sample from the book.
0
 
LVL 22

Accepted Solution

by:
Bill-Hanson earned 2000 total points
ID: 20024993
I never use base URL addressing.  I don't like hard coding anything, and if you add an ssl certificate to your server later, you're going to have to go back and change all of those "http"s to "https"s.

Also, this code is incomplete.  The vPath variable is never used, and the Server_name and DBPath variables are never defined (that's why there's nothing in between "http://" and "/Additional..." in your URL.  It looks like "vPath" should really be named "DbPath", but there's no getting around defining the Server_name variable (which would also be a hard-coded value so your application would not work across multiple servers).

I would just take that part of the code out of the header unless you have a good reason for using it.  Then start using relative addresses.  A relative address is relative to the server, so you don't have to know the server name.  The url always starts with a "/".  Ex:  "/database/view/document".  Or in our case, "/database/view/document/file".
0
 

Author Comment

by:aentice
ID: 20025033
Thank you for your time. It works.
0
 

Author Comment

by:aentice
ID: 20025040
One more thing! How can I open this in a new window?
0
 
LVL 22

Expert Comment

by:Bill-Hanson
ID: 20025069
Just add a target parameter to the anchor tag and set it to "_new".

"[<a href='" + docUrl + "/$File/" + @AttachmentNames + "' target="_new">" + @AttachmentNames + "</a>]"
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month19 days, 20 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question