I'm trying to retrieve userprofile form that matches the email of the current document. If there is no matching email, the system should be able to display a blank form.Below is the coding.
However, the code always run to
Set uidoc = ws.ComposeDocument("","","UserProfile"
even though i know there is matching email found.
==========================================
Dim s As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim uidoc As NotesUIDocument
Dim ws As New NotesUIWorkspace
Dim Email As String
Set uidoc = ws.CurrentDocument
Email= uidoc.FieldGetText( "text" )
Set db = s.CurrentDatabase
Set view = db.GetView("UserProfile"
Set doc = view.GetDocumentByKey(Email)
If doc Is Nothing Then
Set uidoc = ws.ComposeDocument("","","UserProfile"
Else
Set uidoc = ws.EditDocument(True,doc)
End If
However, the code always run to
Set uidoc = ws.ComposeDocument("","","UserProfile"
even though i know there is matching email found.
==========================================
Dim s As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim uidoc As NotesUIDocument
Dim ws As New NotesUIWorkspace
Dim Email As String
Set uidoc = ws.CurrentDocument
Email= uidoc.FieldGetText( "text" )
Set db = s.CurrentDatabase
Set view = db.GetView("UserProfile"
Set doc = view.GetDocumentByKey(Email)
If doc Is Nothing Then
Set uidoc = ws.ComposeDocument("","","UserProfile"
Else
Set uidoc = ws.EditDocument(True,doc)
End If