Audit
Query the Audit module in SugarCRM.
Table Specific Information
Select
When querying Audit you can get Audit logs simply by specifying the Module name (this is required):
SELECT * FROM Audit WHERE Module = 'Contacts'
Allowed values for Module are: Accounts, KBDocuments, RevenueLineItems, Contacts, Opportunities, Leads
If you want to get Audit logs for a single Module Id, the Audit parent_id needs to be tied to the ID that belongs to the module, for instance:
SELECT * FROM Audit WHERE Module = 'Contacts' AND parent_id = '9d46a91c-43bf-11e8-a83c-0681183120c1'
Columns
Name | Type | Description |
Parent_Id | String | The Id of the parent of the record. |
Date_Created | Datetime | The date the record was created. |
Created_By | String | The Id of the user who created the record. |
Created_By_Username | String | The user who created the record. |
Field_Name | String | The field name of the record. |
Data_Type | String | The data type of the record. |
Before_Value_String | String | The before value of the record. |
After_Value_String | String | The after value of the record. |
Before | String | The before value of the record. |
After | String | The after value of the record. |