Setting up audits
Infor Public Sector's auditing tools track when selected records in your database are created, read, updated, or deleted. To set up auditing, you first use the Workflow Manager to select the records you want to audit by adding formulas to your business objects. You can then use Audit Information to view the audit results.
To add an audit formula in the Workflow Manager, first select the business
object and event you want to audit. For example, to create a log when a new service
request is added to the database, you would add a formula to the AfterAdd
event of the ServiceRequest
business object. The formula uses the Hansen.core/.AuditingTrail
object, as in this example:
dim res as Hansen.core/.Result
dim audit as Hansen.core/.AuditingTrail.IAuditDetail =
ServerApplication.NewComponent ( "Hansen.core/.AuditingTrail.AuditDetail",
oServiceRequest.UserInfo)
'Audit create
res = audit.Audit(oServiceRequest, oServiceRequest.UserInfo,
Hansen.core/.AuditingTrail.AuditTrailEventType.Create, "Auditing the
initial creation of a service request")
return res
You can use similar formulas to audit an object's AfterLoad
, AfterUpdate
, and BeforeDelete
events. For a load audit, change AuditTrailEventType.Create
to AuditTrailEventType.Read
; for an update audit use AuditTrailEventType.Update
; and for a delete audit use AuditTrailEventType.Delete
.