Harold Earl A Lorenzo 22.May.12 09:19 PM a Web browser Domino Designer6.5.1Windows XP
hi im working with an assignment where in the system gets the last names of the employee from the data base and sends it to their emails but unfortunately there are names that isn't unique. so what it does is it send the email to those who have the same last name. now im planing that instead of getting the last names it should get their employee ID# so it should be unique and the mail would be sent to the right person. below is the code. pls help and thanks in advance.
Public Function ResolveSendTo(strConAdmin As String, strRegion As String) As String
' BSM 07/2006: This function should check to see if given user name exists in x500 directory, and if not, resolve to
' region's Upload group.
If (ERROR_ON) Then On Error Goto Error_Handler
Dim x500Col As NotesDocumentCollection
Dim x500Doc As NotesDocument
Set x500Col = x500View.GetAllDocumentsByKey(strConAdmin, True)
If (x500Col.Count <> 1) Then
' Either the user does not exist, or there are multiple people with the same flat name
ResolveSendTo = "EDM_" & strRegion & "_Upload"
Else
' Return email address
Set x500Doc = x500Col.GetFirstDocument
ResolveSendTo = x500Doc.GetItemValue("MailAddress")(0)
End If