Link to home
Start Free TrialLog in
Avatar of snocross
snocross

asked on

Doclink database cannot be located

Hi, we have an associate of the month db that emails a link to a document to all people in our company on a monthly basis.  The problem is that for users who do not already have an icon of the database already on their desktop they get a doclink database cannot be found when they try to open the link.  Is there a workaround or better way to do this?

This is the code I use to send out the monthly reminder:

@If(FLAG = "1";@MailSend("_AllPortlandWestbrookUsers" ; "" ;""; "Associate of the month" ;
"Once again it\'s time to nominate the Associate of the Month..." ;
"Double-click to open the link to the nomination form :   " ; [IncludeDoclink] );"");SELECT @All
Avatar of ksi2001
ksi2001

are all of them getting this message or only a few?

check if the database has a default view.
Avatar of snocross

ASKER

Boy that was fast... I'm not sure if it's everybody... I just know who complained... I do know that if I remove the icon from my desktop then I get prompted with a list of servers to choose from.  I asked the complaining user if this was his problem and he said no that he just got a doclink db could not be found error.  Yes there is a default view in the db.
Are you sure he is able to access the server over the network?
Are there other database icons from the same server?

There is a replica ID and preferred server name in a doclink.
Probably the client doesn't know the server where it should look for the replica.

Anyway you can use a button with a code which opens the database and then the desired document.  




Ok unfortunately I have to leave for the weekend now but hopefully we can resume this conversation on Monday.... I will have to check into some of these things then.  Thanks for your help thus far.
Hi

There are many reasons, why this may occur..

      a. Client may not find the server. Check the connection document to check          whether it's set up correctly
      b. The User may not have appropriate access to open the db

      c. The server information in the current location document may be incorrect


Make the user manually open the database using file ->open and try opening it. That can help you figure out the problem'

HTH
Partha
Welcome Sno... Good to see you here at EE ...
Sno,

The client first attempts to locate the replica on the desktop, then on local, then based on the "server hint" in the link.  If all that fials, it goes to the catalog, finds the first server alphabetically that has teh replica, and attempts to open it there.

Reason it could fail:

1) User does not have access to first copy of DB it finds, or to doc that is linked; you will get this (inaccurate) error
2) User does not have access to the server contaiing the first copy it finds (icon on desktop, hint, or catalog)
3) The server identified in the catalog is down or not accessible on the network

You can see which server it is hitting by the status bar messages.

You can resolve all this by using a form that includes a button to add the icon.
p_partha, thanks, none of those happens to be the case in this situation... I can manually open the db from their desktop with no problems.

qwaletee, this is interesting because I noticed our catalog hasn't been updated in ages... what triggers that to be updated because I think our admin turned it off years ago...  why can't I specify exact server and db instead of this so called 'hint'?  Can you tell me more about this form you mention as a workaround?  You mean send them a form with the design embedded in the email?
PS: Hi Arun!!
there is a task on server named catalog which updates catalog database every night. there should be a line in notes.ini, something like ServerTasksAt1=Catalog
The catalog has to be updated across all locations.  Your admin may have turned it off for a good reason -- it can generate a LOT of data that needs to replicate.  An out of date catalog is worse than no catalog so you may want to delete it.

You can't designate a specific server/file for a DocLink, because that would make DocLinks superfluous.  In fact, the button I mention is almost exactly like a database link coded to a specific database and file.

As to the form with the button...  I assume your existing button is on teh nomication form itself.  Create a form caled EMAIL, which contains the following:

text: The text of the e-Mail, inclduing formatting, subject line, etc.

at the bottom: a button, labelled CLICK HERE FOR NOMINATION FORM with the following LotusScript code:
Dim ws as new notesiWorkspace
Dim s as new notesSession
Dim doc as notesDocument
set doc = s.documentContext
if doc.server(0) = "" or doc.path(0) = "" or doc.UNID(0) = "" then
   msgbox "Error -- the button was set up incorrectly"
   exit sub
end if
Dim db as notesDatabase
Set db = s.getdatabase(doc.server(0),doc.path(0))
if db is nothing then
  msgbox "Error -- could not access associate of the month system"
   exit sub
end if
on error resume next
set doc = db.getDocumentByUNID(doc.UNID(0))
on error goto 0
err = 0
if doc is nothing then
  msgbox "Error -- missing nomination form"
  exit sub
end if
ws.editDocument false , doc


To send the message, add an agent with the following code:
Dim ws as new notesUiWorkspace
Dim uid as notesuiDocument
Set uid = ws.currentDocument
Dim doc as notesDocument
Set doc = ui.document
If doc.flag(0) <> "1" then
   exit sub
end if
dim msg as new notesDocument(doc.parentDatabase)
msg.sendTo = "_AllPortlandWestbrookUsers"
msg.Subject = "Associate of the month"
msg.send true
Ok I will try this today, thanks!
I can't save the button with the Lotuscript code... it bombs, highlighting the first line in red;

Dim ws as new notesiWorkspace

Then it refers to a problem on the 24th line saying 'not a valid functionname: editdocument):

ws.editDocument False , doc
By the way I have notes 5.08 if that helps.
SOLUTION
Avatar of p_partha
p_partha

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Ok that worked, thanks!  Can't believe I didn't notice that!  Now the only other issue I have is that the second part of the code that is supposed to send the notification looks like it needs to be manually triggered... (correct me if I'm wrong).  I need this to be an automated message that goes out once per month.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial