Showing results for 
Search instead for 
Do you mean 

Displaying Audit History for Any Entity in SalesLogix 7.5.2 Web Client

by ajappel on ‎03-18-2010 08:53 PM

For those of you who want to see the audit history that is currently only available on the LAN client’s History tabs, there are two good options:

 

1)      Show database changes on the existing History tabs by turning off a filter that hides database changes in the HistoryList.ascx.cs  in Application Architect

Replace:

                HqlBindingSource.Where = string.Format("h.UserId = ui.id and h.Type != {0} and h.Type != {1} and h.{2} = '{3}'", (int)HistoryType.atNote,  (int) HistoryType.atDatabaseChange, keyId, entityID);

 

With :

HqlBindingSource.Where = string.Format("h.UserId = ui.id and h.Type != {0} and h.{1} = '{2}'", (int)HistoryType.atNote,

                 keyId, entityID);

2)      Show database changes on custom tabs.

This can be achieved for the Account, Contact and Opportunity entities by building a mashup that pulls in database changes from the History entity and then displaying this data onto a custom form with a grid (one custom form with grid per entity).  The key to getting the mashup’s query to work properly is to use History.Type = 262156

  Ex. Query = from History h where h.AccountId = :AccountId and h.Type = 262156.

 

To track and display database changes on other entities, including custom entities, you will need to use a mashup, one custom form with a grid per entity and:

1)      Create a custom entity with four custom fields to track the audit history  Ex. LeadHistory

a.       NewValue (string)

b.      OldValue (string)

c.       FieldName (string)

d.       <entity>Id   (StandardId).   Ex. LeadId.  If tracking multiple entities audit history on one custom table, add one <entity>Id per entity being tracked.

2)      Go to SalesLogix Extended tab when viewing the custom entity

a.       Check “Is History table”.  If this option is not available, go to the Properties window and set the “Is History Table” to True (picklist).

b.      Set Foreign Id = <entity>Id   Ex. LeadId

3)      File – Save All and Build Interfaces

4)      Right click on Entity you want to audit   Ex. Lead

a.       On Entity tab check “Audited”

b.      On Entity tab select field(s) that you want to audit by checking the box(s) in the Audited column

c.       On SalesLogix Extended tab select the name of the custom table you created from the “Track History To” picklist

5)      When building the mashup you do not need to include any “Type” criteria in the query.

Ex. Query = from LeadAuditPOC h where h.LeadId = :LeadId

 

 

* There is a great recording under Sage University’s SalesLogix Developer Anytime training (search Audit) that walks you through the steps to create a custom table to store database changes.

Register Read Guidelines Request Partner or Employee Access

What's New in 8.1

Labels