I’m trying to write a script in a computed field on a form that creates a doclink in the field. I have another field (called linkTo) that uses an @dblookup to pull in the UNID of the document I want to create a link to. Here is the code I have:
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim Form As NotesForm
Dim rtitem As NotesRichTextItem
Dim linkTo
Set db = session.CurrentDatabase
Set doc = db.Forms
linkTo = doc.GetItemValue (linkTo)
Call rtitem.AppendDocLink ( linkTo, db.Title)
End Sub
I’m getting the error “Type Mismatch” when I try to open a document, and no link is being created. I’ve been developing in Notes for almost a year now, but this is my first project using Lotus Script so any help would be greatly appreciated!