Send email with doclink back to parent form

I have a main form and a response to that form. When the user clicks on the "submit" button on the response form, I want it to send out an e-mail with a doclink to the main (parent) form rather than the response form itself.

The response form already inherits the DocID of the parent -- but I'm a complete script neophyte and have no clue how to send the e-mail without including the doclink back to the parent instead of the child.

Could you kindly provide the code? I've tried posting elsewhere, but I just get answers such as "use appendrichtextitem." That doesn't help me because I don't know how to code in script. I would love the actual block of code. I am willing to beg and grovel! Thanks you.

First get a handle to the parent document using the DocID in the response. Then use that document in the append doclink method.
Set ParentDoc = currentDB.
GetDocumentByUNID
( currentdoc.pparentID(0) ) 

Set newMemo = New NotesDocument( db )
  'create memo 
Set rtitem = New NotesRichTextItem
( newDoc, "Body" ) ' create body
' use appendTest to add other body text
Call rtitem.AppendDocLink( ParentDoc,
 "comment information",  "Hot spot 
information")
Take a look at this for more information on appendDocLink.

Do you have comments on this Ask the Expert question and response? Let us know.

This was first published in September 2004