I have an action button in a form that will send the document in a stored form to a user using doc.send(True). The document has doc links in it. When the user reads the resulting memo in his/her inbox, the doc links become database links to their own mail database. $Links is gone! The links are useless! How do I retain the links? Here is my code:
Sub Click(Source As Button)
Set session = New notessession
Set ws = New notesuiworkspace
Set db = session.currentdatabase
Set uidoc = ws.currentdocument
uidoc.Editmode = True
Set doc = uidoc.Document
doc.Subject = "Your request for a job accommodation has been received"
doc.Form = "COVER_LETTER_TO_EMP"
doc.Submit = 1
doc.SubmittedBy = session.username
doc.SubmittedDt = Now()
Call uidoc.Refreshhideformulas
Set profiledoc=db.getprofiledocument("DBPROFILE")
dummyuser=profiledoc.DummyUser
enablenotifications$=profiledoc.EnableNotifications(0)
If dummyuser(0)<>"" Then
sendto = dummyuser
Else
sendto = doc.Employee
End If
If enablenotifications$="1" Then Call doc.Send(True, sendto)
Call uidoc.Save
Messagebox "Sent!"
End Sub