Problem with Send via Agent

Hi,I have an agent who’s sending a docLink via Email.

But I received the Email without the DocLink.

What’s wrong with my code?

Sub Initialize

Dim s As New notessession

Dim db As notesdatabase

Dim memo As notesdocument

Dim webdoc As notesdocument

Set db = s.currentdatabase

Set webdoc = s.documentcontext

Set memo = New notesdocument(db)

Dim item As NotesRichTextItem



Set rtitem = New NotesRichTextItem( memo, "Body" )

Call rtitem.appendtext("You have recieved a new PFRC Request")

Call rtitem.appendtext("Please follow the document link below to view this document.")

Call rtitem.AppendDocLink( webdoc, "Document Link" )



memo.form = "Memo"

memo.SendTo = "aaaa@aaa.com"

memo.Importance = "1"

memo.CopyTo = "bbbb@bbb.com"

memo.Subject = "New PFRC Request"



Call memo.Send(False)

End Sub

Thank you

Subject: Problem with Send via Agent

Do you get any error ?Does your database have a default view ? ( its required for sending doclinks )

cheers !!

Ashish

Subject: RE: Problem with Send via Agent

Yes, it’s exactly that, I got a message that I don’t have a default view.

How to do that?

Subject: RE: Problem with Send via Agent

Open any view in the design and select the option “Default when database is first opened” in the 2nd tab of view properties.

cheers !!

Ashish

Subject: RE: Problem with Send via Agent

I did that. It still doesn’t work !