Hi,I have been using the small library code snippet below in previous versions for several years to detect a users ‘Out Of Office’ status before sending reminder emails or or redirecting workflow requests.
Now that V8.5 uses ‘OOO as a service’, this code is no longer viable.
Can anybody help with an alternate method/code snippet or suggest a reliable alternative of any sort?
Thanks in anticipation.
============ Code start ===================
Function IsApproverOO(UserName As String) As Integer
'Returns false if approver is in office or true if approver is away
Dim OoODoc As notesDocument
Dim nName As notesName
If OoODb.isopen=False Then
Print "Could not open OoO database"
Exit Function
End If
If OoOView Is Nothing Then
Print "Could not open view in OoO database"
Exit Function
End If
Set nName=New notesName(userName)
Set OoODoc=OoOView.getDocumentByKey(Lcase(nName.canonical),True)
If OoODoc Is Nothing Then
IsApproverOO = False
Elseif Lcase(OoODoc.activated(0))="active" Then
IsApproverOO = True
Else
IsApproverOO = False
End If
End Function
============ Code End ===================