Audit Event Creation

If you add, edit, or delete an entity which is created using a business object for which the entity audit feature is enabled, the system checks whether an active audit event type exists for the entity business object. If so, it considers the active audit event type and creates the audit event using the respective audit event type. The system creates the audit event while:

  • Defining an entity when the Add Action option is selected in the audit event type

  • Editing an entity when the Update All option is selected in the audit event type or when the updated element is listed in the Audit Elements for Entity Update section

  • Deleting an entity when the Delete Action option is selected in the audit event type

For more information about the audit event type, see Audit Event Type.

The audit event is created in the Pending status. Note that the system creates one audit event for the entity irrespective of the number of changes made during the entity update. The entity type and entity ID for which an audit event is created are added corresponding to the audit event in the C1_​AUDIT_​EVENT table. For example, if the audit event is created while adding or updating a pricing rule, then the entity type is set to Pricing Rule and entity ID is set to the pricing rule ID. In addition, an effective date is stamped corresponding to the audit event in the C1_​AUDIT_​EVENT table. Note that if the entity has a start date, then the effective date is set to the entity's start date. But, if the entity does not have a start date, then the effective date is set to the system date.

At a time, you can have only two audit events for the entity in the Pending status - one audit event which is created during the Add action and another audit event which is created during the Update action.

Note: Before creating an audit event, the system checks whether an audit event for the entity ID with the same effective date already exists in the Pending or Error status for the respective action. If so, the system does not create a new audit event for the entity. Instead, the system adds a new log entry in the existing audit event.