Pull that Trigger Now and Audit All Data in SageCRM

By | October 28, 2010
This is a term that we normally come across in Accounting and ERP packages and not in CRM. In SageCRM we do have tracking in Case and Opportunity which comes close to auditing but it is not actually auditing.  It is more of tracking of the phases that an opportunity or a case goes through in its entire life cycle. But what about other entities like company, person in SageCRM. These entities too have critical data like address and phone details. Any unauthorized changes to these will have significant impact on the customer information.  Even in the entities like opportunity and cases there is no provision to store the changes made to field other than those mentioned in tracking. Although there is a field that stores the user who had last updated but that does not help. The information does not tell you what has been updated.

This can be achieved rather easily by using SQL. All you need to do is write a trigger on each of the tables that need to be audited and based on the old value and new value provided by the trigger insert a record in a custom table. This table can store the record id, date and time, user, field name, old value and new value. You can then create custom tab in the entity and using the record id show the administrator exactly which fields were updated and by whom. Depending on the frequency of the edits that you might for your SageCRM, you can create different audit tables for different entities.

And you thought trigger was only useful in guns!

For queries regarding the functionality, please feel free to drop us an email at crm@greytrix.com.