Hi all, I have my current form to send as a doclink to user’s having higher access roles from a lower ACL user.I knew a form cannot be sent as a doclink, so I’m saving the form in the earlier stage of my code.This gets stored in a view “byname” as soon as i save it. So, I tried to collect the document from the view by passing the user name as key(b’cause his form only need to be sent to another user).
I got a link but prompting a message,“Document cannot be found in the view”…Plz help me with the code…
Dim ws As New NotesUIWorkspace
Dim session As New NotesSession
Dim uidoc As NotesUIDocument
Dim db As NotesDatabase
Dim view As NotesView
Dim dc As NotesDocumentCollection
Dim doc As NotesDocument
Dim rtitem As NotesRichTextItem
Set db = session.CurrentDatabase
Set view = db.GetView ("byname" )
Set uidoc=ws.CurrentDocument
key = uidoc.FieldGetText("emp_name")
Set dc=view.GetAllDocumentsByKey(key,True)
Set doc = dc.GetLastDocument
Set doc = New NotesDocument( db )
Set rtitem=New NotesRichTextItem(doc,"body")
doc.Form = "Memo"
Call doc.Save(True,False)
doc.sendto=uidoc.FieldGetText("head")
doc.subject="Employee Form"
Call rtitem.AppendDocLink(doc,Here is the link)
Call doc.Send( True)
Call uidoc.Close(True)
If I’m wrong,kindly help me…
Thanks,
Swaroopha