Let the platform do the work

Adding Fields to a Module's Audit Log

Overview

Users are able to view the history of changes via each record's audit log which can be accessed by selecting "View Audit Log" from the record view's Actions menu. Please note that only fields that are marked as "Audit" via Admin > Studio will have changes tracked in the audit log. For more information regarding the audit log, please refer to the Historical Summary vs. Activity Stream vs. Audit Log article. In addition, fields marked as "Audit" will generate update posts in the activity stream for Sidecar modules (e.g. Accounts and Contacts) whenever the field gets updated in a record. This article will cover how to mark a field for "Audit" in Studio to be added to a module's audit log.

Note: For Sugar versions prior to 8.0.0, the audit log was known as "Change Log" and did not capture the originating source of the field change nor provide access to the email address audit log.

Use Case

In this example, we will mark the Type field in the Accounts module for audit so that any change to the field will be recorded in the module's audit log.

Steps to Complete

  1. Navigate to Admin > Studio > Accounts > Fields.
  2. Select the Type field.
    rest/v11/doc_PagesFiles/62a8ab2e-32af-ffc9-23ff-5502805c2a33/file/uploadfile?force_download=0&platform=base
  3. Mark the Audit checkbox then click "Save" to preserve the change.
    rest/v11/doc_PagesFiles/2d231ec3-0603-44fa-ace9-55028087d965/file/uploadfile?force_download=0&platform=base

Application

Navigate to the Accounts module and change the Type field (e.g. from "Customer" to "Partner") for a record. Once the change is saved successfully, click the Actions menu on the upper right of the accounts record view and select "View Audit Log".
rest/v11/doc_PagesFiles/d898c68f-4267-3f08-b25d-5502809d3694/file/uploadfile?force_download=0&platform=base

The Type field will appear on the Audit Log page and details such as the old/new value of the field, the user who made the change, the source (e.g. Sugar user, Web to Lead) from which each field change originated, etc. will be displayed. You will be able to view the details of historical changes for all audited fields in the module and can easily perform a search to retrieve log entries for specific fields (e.g. Name), old values, or new values.

Note: The list of fields currently marked for audit for the module will appear at the bottom of each record's audit log page.
rest/v11/doc_PagesFiles/99574968-b95a-bd59-1e96-550280867db0/file/uploadfile?force_download=0&platform=base

An update post will also generate in the activity stream when any changes are made to audited fields. To view the post, simply click the Activity Stream button below the account's fields to make the activity stream visible. You can hover your mouse on the field's name within the update post to view the field's old value and new value. The Update post can also be viewed via the Home page and List View activity stream if the record is marked for following.  

Note: Users who do not have access to view the audited field due to a role restriction will see a generic update post (e.g. "Updated Complete Holding") on their activity stream as the field name will not be mentioned in the post.
Account ActivityStream
Note: If you cannot access activity streams in Sugar 11.0.x and higher, the feature may have been disabled via Admin > System Settings. For more information, refer to the System documentation in the Administration guide.                                                                                                                                                                                                                                                                                                     rest/v11/doc_PagesFiles/10e806ef-175c-4bb1-e6eb-55022f9bcfc8/file/uploadfile?force_download=0&platform=base