Deletes the task audit history for all tasks that meet the specified criteria. Criteria include date range, application server, and user.
To delete audit information for a given task, use ClearAuditTasks2. |
<HsvSystemInfo>.ClearAuditTasks dStartTime, dEndTime, vbAllServers, bstrServer, vbAllUsers, lActivityUserID
Double (ByVal). The starting date and time of the date range. Pass a Double that can be cast to a Date format. | |
Double (ByVal). The ending date and time of the date range. Pass a Double that can be cast to a Date format. | |
Boolean (ByVal). Specifies whether to delete the task audit history for all application servers. Pass TRUE for all application servers, FALSE to specify an application server with the bstrServer argument. | |
String (ByVal). The name of the application server for which to delete the task audit history. This argument is used only if the vbAllServers argument is set to FALSE. | |
Boolean (ByVal). Specifies whether to delete the task audit history for all users. Pass TRUE for all users, FALSE to specify a user with the lActivityUserID argument. | |
Long (ByVal). The activity user ID of the user for whom to delete the task audit history. This argument is used only if the vbAllUsers argument is set to FALSE. To get a user’s activity user ID, use GetActivityUserID. |
The following subroutine deletes the audit history for a given user. The subroutine takes a username; the activity user ID required by ClearAuditTasks is obtained by passing the username to GetActivityUserID.
Sub ClearUserTaskAudit(sUserName As String) Dim cSysInfo As HsvSystemInfo, lUserActID As Long 'm_cHsvSession is an HsvSession object reference Set cSysInfo = m_cHsvSession.SystemInfo cSysInfo.GetActivityUserID sUserName, lUserActID cSysInfo.ClearAuditTasks 0, CDbl(Now()), True, "", _ False, lUserActID End Sub