Hello, I wrote the following code, hoping that it would help me get Person Document values from the Domino Directory on the server.
What am I doing wrong?
Sub Initialize
Dim Session As New NotesSession
Dim Directory As NotesDatabase
Dim view As NotesView
Dim PersonDoc As NotesDocument
Dim thisDoc As NotesDocument
Set thisDoc = Session.DocumentContext
Set Directory = Session.GetDatabase("myServer" , "names.nsf")
Set View = Directory.GetView("People")
Call View.FTSearch("FIELD FullName= " + Session.CommonUserName)
Set PersonDoc = View.getFirstDocument
thisDoc.FullName = PersonDoc.GetItemValue( "Fullname" )
thisDoc.CompanyName = PersonDoc.GetItemValue( "CompanyName" )
thisDoc.OfficeStreetAddress = PersonDoc.GetItemValue( "OfficeStreetAddress" )
thisDoc.OfficeCity = PersonDoc.GetItemValue( "OfficeCity" )
thisDoc.OfficeState = PersonDoc.GetItemValue( "OfficeState" )
thisDoc.OfficeZIP = PersonDoc.GetItemValue( "OfficeZIP" )
thisDoc.OfficeCountry = PersonDoc.GetItemValue( "OfficeCountry" )
End Sub