ClearAuditTasks2

Deletes the audit history for a given task that meets the specified criteria. Criteria include date range, application server, and user.

Note:

To delete audit information for all tasks, either set the vbAllTasks argument to FALSE or use ClearAuditTasks.

Syntax

<HsvSystemInfo>.ClearAuditTasks2 dStartTime, dEndTime, vbAllServers, bstrServer, vbAllUsers, lActivityUserID, vbAllTasks, lActivityTaskID

Argument

Description

dStartTime

Double (ByVal). The starting date and time of the date range. Pass a Double that can be cast to a Date format.

dEndTime

Double (ByVal). The ending date and time of the date range. Pass a Double that can be cast to a Date format.

vbAllServers

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.

bstrServer

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.

vbAllUsers

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.

lActivityUserID

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.

vbAllTasks

Boolean (ByVal). Specifies whether audit information for all tasks or a given task is deleted. Pass TRUE for all tasks, FALSE to specify a task with the lActivityTaskID argument.

lActivityTaskID

Long (ByVal). The ID of the task for which to delete audit information. This argument is used only if the vbAllTasks argument is set to FALSE.

Task IDs are represented by the HFMConstants type library constants listed in User Activity Constants.

Example

The following subroutine deletes the audit history for a given task. The subroutine takes the ID of the task to be deleted.

Sub ClearTaskAuditAllUsers(lTaskId As Long)
Dim cSysInfo As HsvSystemInfo
'm_cHsvSession is an HsvSession object reference
Set cSysInfo = m_cHsvSession.SystemInfo
cSysInfo.ClearAuditTasks2 0, CDbl(Now()), True, "", _
   True, 0, False, lTaskId
End Sub