Set Audit Fields on Insert

Code Customization
Set Audit Fields on Insert

An audit trail tracks who did what to which record in your database. Using an audit trail, you can record who created a record, when it was created, who last modified it and when, and so forth. Audit trails are useful in applications where it is important to track who has modified the data, such as in customer service and order entry applications where money and flow-of-merchandise is important.

The value of an audit trail also becomes apparent when you must debug how certain data got into your database. Having the basic trace information of who created it and when allows you to investigate the circumstances in which the data was added or modified.

This customization implements an audit trail by creating and modifying audit fields in a database record.

Note, that you can also add Formula in the Databases to the same field to implement most of audit trail tasks

This customization modifies the Data Access Layer such that every insert for that table goes through this customization.

For a Web Application the customization will be added in:

..\<Application Name>\Business Layer\<Table Name>Record.cs

For example: C:\MyApp1\Business Layer\OrdersRecord.cs

For a Web Site the customization will be added in:

..\<Application Name>\App_Code\Business Layer\<Table Name>Record.cs

For example: C:\MyApp1\App_Code\Business Layer\OrdersRecord.cs


Step 1:  Use this wizard to add code customization.

Step 2:  Build and run the application.

Customizations included in this wizard are provided as a sample to demonstrate a feature, and may work only in specific situations. The Iron Speed Designer support team cannot assist in the resolution of problems which may occur as a result of customizing your application or modifying a customization to fit a particular purpose.

Terms of Service Privacy Statement