Friday, 24 May 2013

Audit Tables



1. Open the record definition of the base record that you wish to audit. Save it as a new record, prefaced with AUDIT_.
2. Remove the all edit and key attributes from the newly saved record. Also remove any attributes such as PARENT records, Query Security Records, and PeopleCode.
3. Add to the top of the audit record the following three special audit-specific fields in the same order given below. The AUDIT_STAMP must be given the attribute AUTOUPDATE.
4. Make these fields required and keys. Then build the table.
5. Open the record properties for the record you want to audit, Under the Record Audit, we have the following options. (Open VENDOR Record, go to USE TAB in Record Properties. There you will find RECORD AUDIT. In that give your AUDIT RECORD NAME (Which you created). )


Record Name – Specify the user-defined audit record.
Audit Options – following are the audit options to choose for auditing the record.
· Add - Inserts an audit table row whenever a new row is added to the table underlying this record definition.
· Change - Inserts one or two audit table rows whenever a row is changed on the table underlying this record definition.
· Selective - Inserts one or two audit table rows whenever a field that is also included in the record definition for the audit table is changed.
· Delete - Inserts an audit table row whenever a row is deleted from the table underlying this record definition.

Now perform online transactions on the audited table, query the audit table to know what is changed and who changed it at what time.

No comments:

Post a Comment