Solved

Document link problem....

Posted on 2001-06-09
9
413 Views
Last Modified: 2013-12-18
Hi experts,

I'm able to create a documentlink in a document, to a document in another database using @DbLookup. The documentlink is present on the form, but when i click the link a message appears:

The linked document cannot be found in the view.

What can be wrong ? Is the documentlink incomplete, so it's looking in the local database for the document ?
How can I generate a "complete" documentlink, that jumping to the document in the other database ?

Greetings,

Bob
0
Comment
Question by:oosterbaan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6172022
The best method would be to use Richtext method AppendDocLink, This creates fully qualified link with server name and replica id of the database.

By the way what is your method of creating doc link. If it is through dblookup, then how ??? Most of the tweaks desn't work properly.

~Hemanth
0
 
LVL 1

Author Comment

by:oosterbaan
ID: 6172269
Hi Hemanth,

This is the way how I did it...

I've created in every document in the source database a computed when composed textfield, containing the formula @DocumentUniqueID.
In the target database, I'm using the @DbLookup in a computed textfield, the get the documentlink from the source document:

@DbLookup("":"NoCache";"<replicaID sourceDB>";"<ViewName>";"<key to document>";"<Fieldname containing DocuniqueID>").

This is working very well, when the document is in the same database...

Greetings,

Bob
0
[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

 
LVL 1

Author Comment

by:oosterbaan
ID: 6172313
I have no knowledge with writing LotusScript, but is there a way to create a button (instead of a doclink) to jump to a other form in another database. I have red something about a LotusScript command called GetDocumentById.
I can imagine that I set the DocumentID in the source document (other database) in a computed when composed field and transfer this value to the target document. After transfering the value (the DocumentID) I can use this with the GetDocumentByID command to open the document...

Greetings,

Bob
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6173194
Try this in a button

dim ws as New NotesUIworkspace
dim doc as NotesDocument
dim db as NotesDatabase

set db = New NotesDatabase( Server, File )
set view = db.GetView( "<viewname>" )
set doc = view.GetDocumentByKey( "<Key to Document>")
If not doc is nothing then
call ws.EditDocument( True, doc )
end if

0
 
LVL 1

Author Comment

by:oosterbaan
ID: 6173519
Thanks HemanthaKumar,

Thanks for your code....

Can you help me out to modify your code ? I like to change a few things (if it is possible) ?

- The server and filename are in a variable (a field on the document) and is it possible to use a replicaID instead of the server and filename ?

- The "Key to Document" is also present in a field on the document. Is it possible to use this, and how is the syntax in that case ?

- I suppose that the line "call ws.EditDocument(True,doc) will open the document in editmode. I like to have it openend in readmode. The user who will click this button will only have read rights on this database....

Thanks....

Greetings,

Bob

0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6174176
This is the modified code, with replicaid and key from uidocument

dim ws as New NotesUIworkspace
dim note as NotesDocument
dim doc as NotesDocument
dim db as New NotesDatabase( "", "" )

set note = ws.CurrentDocument.Document
If db.OpenByReplicaID( note.Server(0), note.ReplicaID(0) ) Then

set view = db.GetView( "<viewname>" )
set doc = view.GetDocumentByKey( note.Key(0) )
If not doc is nothing then
call ws.EditDocument( FALSE, doc ) ' opens in read mode
end if
End IF

0
 
LVL 1

Author Comment

by:oosterbaan
ID: 6176604
Thanks Heman~

When using your last code, I get a error saying:

"Invalid replica id (<ReplicaID that's in the field>)"

It's a computed by composed field and set OK, because I'm using this field also for a @DbLookup in this database.

If you have not any idea what this can be, please change your code using the database filename in a variable instead of a ReplicaID. I can use this also....

Greetings,

Bob
0
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 75 total points
ID: 6178169
I hope the format of replicaid is wrong it should not be like
"85255FA9:00747B84", instead it should be like this "85255FA900747B84".

Convert the value into text type by either using @text in the default value of the replica id field

or


Use this

dim ws as New NotesUIworkspace
dim doc as NotesDocument
dim db as NotesDatabase

set db = New NotesDatabase( note.Server(0), note.File(0) )
set view = db.GetView( "<viewname>" )
set doc = view.GetDocumentByKey( note.Key(0) )
If not doc is nothing then
call ws.EditDocument( FALSE, doc ) ' opens in read mode
end if

~Hemanth
0

Featured Post

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

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

Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
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…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

623 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