Hi,
How can I create a docllink (by using Appenddoclink) on the form?
The code below currently works for the button. I am trying to figure out the way to use appenddoclink instead of the button. For example, on the form, when the user enters the group name into the field, and saves the form (after he/she is done). If the group does exist in the address book database, then that field (groupname) should be “doclink” (by using this syntax: Call nrtiNotice.AppendDocLink(compare_doc, ListName, ListName)) so when the user clicks on that link, then they will be redirected to the address book database. If the group does not exist in the address book database, then it there is not link, however, the name of the group should appear in the field as usual.
====================
Sub Click(Source As Button)
Dim session As New notessession
Dim curdb As NotesDatabase
Dim nabdb As notesdatabase
Dim curdoc As NotesDocument
Dim nabdoc As NotesDocument
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim nablookupview As notesview
Dim servername As String
servername=“XXXXX”
Set curdb=session.currentdatabase
Set nabdb=New notesdatabase(servername, “names.nsf”)
Set uidoc = workspace.CurrentDocument
Set curdoc=uidoc.document
Set nablookupview=nabdb.GetView(“($VIMGroups)”)
Set nabdoc=nablookupview.GetDocumentByKey(curdoc.listname(0), True)
If nabdoc Is Nothing Then
Msgbox “Document for group “+curdoc.listname(0)+” is not found in NAB”
Else
Call workspace.EditDocument(False, nabdoc, False)
End If
End Sub
===================================
Thanks,
Mike Woo