EncompDEV
LoanDebugger2

Example - Audit Log in a custom form

1. Custom Input form.
2. Simple Form Code.
- This project/concept shows how to access audit trail from custom form code.

Audit Log in a custom form

Code on this form:

Try
    Dim sFieldID As String = txtFieldID.Text
    Dim entries As EllieMae.Encompass.Collections.AuditTrailEntryList = Loan.AuditTrail.GetHistory(sFieldID)
    Dim entry As AuditTrailEntry
    Dim s As String = "Field: " + sFieldID + " Entries: " + entries.Count.ToString() + vbCrLf
    For Each entry In entries
        s += entry.Timestamp.ToString("yyyy-MM-dd HH:mm:ss") + vbTab + _
            entry.UserID + vbTab + entry.Field.FormattedValue.Trim() + vbCrLf
    Next
    txtAudit.Text = s
Catch ex As Exception
    txtAudit.Text = "Error: " + ex.Message
End Try