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.

<HFMwSystemInfo>.ClearAuditTasks2 dStartTime, dEndTime, vbAllServers, bstrServer, vbAllUsers, bstrActivityUserName, vbAllTasks, lActivityTaskID

Argument

Description

dStartTime

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

Input argument. Double subtype.

dEndTime

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

Input argument. Double subtype.

vbAllServers

A flag that determines 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.

Input argument. Boolean subtype.

bstrServer

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.

Input argument. String subtype.

vbAllUsers

A flag that determines whether to delete the task audit history for all users. Pass TRUE for all users, FALSE to specify a user with the bstrActivityUserName argument.

Input argument. Boolean subtype.

bstrActivityUserName

The user name of the user for whom to delete the task audit history. This argument is used only if the vbAllUsers argument is set to FALSE.

Input argument. String subtype.

vbAllTasks

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.

Input argument. Boolean subtype.

lActivityTaskID

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.

Input argument. Long subtype.

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)
Dim cHFMSysInfo
Set cHFMSysInfo = Server.CreateObject("Hyperion.HFMwSystemInfo")
'cHFMSession is an HFMwSession object reference.
cHFMSysInfo.SetWebSession cHFMSession
cHFMSysInfo.ClearAuditTasks2 0, CDbl(Now()), True, "", _
   True, "", False, lTaskId
End Sub