%REM
Purpose: To check if the given date is the off day
Author:Atin
Date: 20-Nov 2007
Version: 1.0
%END REM
On Error Goto errorHandler
'Set error flag to false assuming there is no error
objErr.errFlag=False
Dim docProfile As NotesDocument
Dim varNonWrkDays As Variant
Set docProfile=dbCurrent.GetProfileDocument("Profile")
isOffDay=False
If Not docProfile Is Nothing Then
varNonWrkDays= docProfile.fldNonWrkDays
Forall tmpNonWrkDay In varNonWrkDays
Dim strWeekDay As String
strWeekDay = Weekday(ndtDate.DateOnly)
If lstWeekDays(strWeekDay)=tmpNonWrkDay Then
strOffDay=lstWeekDays(strWeekDay)
isOffDay=True
Exit Forall
End If
End Forall
End If
cleanExit:
Exit Function
errorHandler:
Call objErr.PostError (Err, Erl, "Common :: Script Library ", "",docSetu
p,objErr.CreateLogDoc)
Resume cleanExit
End Function
--------------------------------------------------------------------------------
---------------------
cleanExit:
Exit Function
errorHandler:
Call objErr.PostError (Err, Erl, "Common :: Script Library ", "",docTemp
,objErr.CreateLogDoc)
Resume cleanExit
End Function
--------------------------------------------------------------------------------
--------------------------
cleanExit:
Exit Function
errorHandler:
Call objErr.PostError (Err, Erl, "Common :: Script Library ", "",Nothing
,objErr.CreateLogDoc)
Resume cleanExit
End Function
--------------------------------------------------------------------------------
-----------------------
Public Function getAgentName As String
%REM
Purpose: to get the name of the Agent
Author:Atin
Date: 18-Sep 2006
Version: 1.0
%END REM
On Error Goto errorHandler
'Set error flag to false assuming there is no error
objErr.errFlag=False
Dim currAgent As NotesAgent
'Set the current running agent
Set currAgent=currSession.CurrentAgent
'Set the name of agent
getAgentName =Trim(currAgent.Name)
cleanExit:
Exit Function
errorHandler:
Call objErr.PostError (Err, Erl, "Common :: Script Library ", "",Nothing
,objErr.CreateLogDoc)
Resume cleanExit
End Function
--------------------------------------------------------------------------------
----------------------