Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Moving from one document to another using DocLink

Status
Not open for further replies.

san127345

Programmer
Oct 26, 2002
5
IN
I am not able to open from a document from another document with the help of Document Unique ID . Pls tell me if there is some another way by how i can open a particular document from one document to another.The Error is being thrown away on the use of @DBlookup to search a particular Document ID .
 
San What is that you want , do u need to call other document by client or web.Please let me know
 
I want to call the other document in client environment.


Thx for it.
 
You can use LotusScript to open another document if you have the UNID.
Unfortunately, it means that you'll need a button or a hotspot to do that.

How exactly is the UNID gathered, and under what circumstances does the user wish to get to the other document ?

Pascal.
 
Unid is gathered by @dblookup or by Script formula getalldocumentbykey . but the Unid or found Document has to be open in the workspace user interface.
 
The Hidden View records the parent and child info. On using formula @DBlookup many times it is unable to return the match document. Pls tell Me if y script i finds it then how can i goes for opening the searched document in Workspace. Cause in formula we have @opendocument
 
Well, if you have the right UNID, opening the document is easy. If we assume that DocID is the field on the form that holds the UNID to open, then create a button and put this code in the click event :

Code:
dim session as new notessession
dim ws as new notesuiworkspace
dim db as notesdatabase
dim uidoc as notesuidocument
dim uitarget as notesdocument
dim doc as notesdocument
dim targetdoc as notesdocument
dim docid as string

set db = session.currentdatabase
set uidoc = ws.currentdocument
docid = uidoc.fieldgettext("docID")
set targetdoc = db.getdocumentbyUNID(docID)
call ws.editdocument(false,targetdoc,true)

And presto ! The linked document opens. I tested this code and it works for me, so you should have no problem.
 
HY pmonett,
I believe this code will work for me. Thanks for yours support.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top