Audit Log Setup

Introduction

When you set up the Audit Log, you need to set up the following:

Prerequisites

To set up the Audit Log, you need to:

Have these user licenses Have these permissions Complete these tasks
and review these topics
before continuing
  • Create and Customize List Views

  • Manage Public Templates

  • View Setup and Configuration

Set Up the Audit Log

When setting up the Audit Log, complete these tasks:

Configure the Audit Log Page Layout

  1. Access FieldFX Back Office.

  2. Switch to Salesforce Classic.

  3. From Setup, enter object in the Quick Find box, then select Objects.

  4. Click Audit Log.

  5. Under Page Layouts, click Edit next to Audit Log Layout.

  6. Add the following fields to the layout:

    • Cleared

    • New Audit Log

    • Originating Audit Log

  7. On the toolbar, click Buttons.

  8. Drag Packet Viewer into the Custom Buttons section.

  9. Click Save.

Grant Permissions

Management Personnel Permissions for Audit Log

Grant for them to use in Audit Log.

  1. From Setup, enter permissions in the Quick Find box, then select Permission Sets.

  2. Open a permission set.

  3. Under Apps, click Object Settings.

  4. Click Audit Logs.

  5. Click Edit.

  6. Under Object Permissions, select Read, Create, and Edit.

  7. Under Field Permissions, select Read and Edit for every field.

  8. Click Save.

  9. Repeat the above steps for other permission sets as needed.

  10. Continue with FieldFX Mobile User Sync Permissions for Audit Log.

FieldFX Mobile User Sync Permissions for Audit Log

Grant FieldFX Mobile users permissions so that their syncs get recorded in the Audit Log.

  1. From Setup, enter "permissions" in the Quick Find box, then select Permission Sets.

  2. Open a permission set for FieldFX Mobile.

  3. Under Apps, click Object Settings.

  4. Click Audit Logs.

  5. Click Edit.

  6. Under Object Permissions, select Read, Create, and Edit.

  7. Under Field Permissions, select Read and Edit for every field.

  8. Click Save.

  9. Repeat the above steps for other permission sets as needed.

Packet Viewer User Access

Grant users access to the Packet Viewer.

  1. From Setup, enter permission in the Quick Find box, then select Permission Sets.

  2. Open a permission set for Visualforce pages.

  3. Under Apps, click Visualforce Page Access.

  4. Click Edit.

  5. Add "FX5.PacketViewer" to Enabled Visualforce Pages.

  6. Click Save.

  7. Repeat the above steps for other permission sets as needed.

Set Up Features

Complete the setup for these features:

Email Notifications

You can set up email notifications to alert system administrators when sync upload errors occur.

System administrators can then resolve sync upload errors before they cause further disruption.

Set Up Email Notifications

  1. Access FieldFX Back Office.

  2. Switch to Salesforce Classic.

  3. Add an email template:

    1. From Setup, enter email templates in the Quick Find box, then select Classic Email Templates.

    2. Click New Template.

    3. Select Text.

    4. Click Next.

    5. In Folder, select "Unified Public Email Templates".

    6. Select Available for Use.

    7. In Email Template Name, enter "Sync Upload Error".

    8. In Subject, enter "Sync Upload Error".

    9. Copy the following text:

      A sync upload error has just occurred.
      
      Details:
      Audit Log Entry: {!FX5__Audit_Log__c.Name}
      User: {!FX5__Audit_Log__c.FX5__User__c}
      Date/Time: {!FX5__Audit_Log__c.FX5__Event_Date__c}
      Record: {!FX5__Audit_Log__c.FX5__Tracking_Number__c}
      Error: {!FX5__Audit_Log__c.FX5__Message__c}
      
      Please access the Audit Log and resolve this sync upload error immediately.
    10. Paste the text into Email Body.

    11. Click Save.

  4. Add a workflow rule:

Salesforce will retire Workflow Rules and their Process Builder. The current FieldFX Managed Package workflows and process builder should be migrated over the flows before that.

Workflow Rules

  • Inventory_Location_Name_RSLB

  • OnStatusWorkflowPropertyChanged

  • RuleCriteriaHasChange

  • SyncConfigurationChange

  • UniqueWarehouseCatalogItem

  • UpdateUniqueId

Process Builder

  • Show all versionsUpdate PO Status from PO Misc Cost Receipt

  • Update Transfer Order from Transfer Order Line

For more information, see

  1. From Setup, enter workflow rules in the Quick Find box, then select Workflow Rules.

  2. Click New Rule.

  3. In Object, select "Audit Log".

  4. Click Next.

  5. In Rule Name, enter Sync Upload Error.

  6. In Description, enter Email notification for sync upload errors.

  7. In Evaluate the rule when a record is, select created.

  8. Under Rule Criteria, select the following:

    • Run this rule if the following: select Criteria are met

    • Field: Select Audit Log: Type

    • Operator: Select equals

    • Value: Select SyncUploadError
      Screen shot of Rule Criteria selections

  9. Click Save & Next.

    1. Add an email alert:

  10. Click Add Workflow ActionNew Email Alert.

  11. In Description, enter Sync Upload Error.

  12. In Email Template, select "Sync Upload Error".

  13. In the Selected Recipients list, add the users to receive alerts about sync upload errors.

  14. In From Email Address, select "Current User’s email address".

  15. Click Save.

  16. Click Done.

  17. Click Activate.

List Views

You should set up custom list views to make tracking sync activity much easier.

We recommend that you create the following list views:

Create the List Views

  1. Access FieldFX Back Office.

  2. Switch to Salesforce Classic.

  3. Open the Audit Logs tab.

  4. Click Create New View.

  5. Follow the steps in Add a new Custom View then customize the view as follows:

    Type Step # Enter this…​

    Unresolved Sync
    Upload Errors

    In View Name, enter `Unresolved Sync Upload Errors.

    Enter the following:

    Field Operator Value

    Type

    contains

    SyncUploadError

    Cleared

    equals

    False

    1. Select the following:

      • Audit Log ID

      • Event Date

      • User

      • Message

      • Tracking Number

      • Cleared

    2. Click Add.

    Select Visible to all users

    Resolved Sync Upload Errors List View

    Enter Resolved Sync Upload Errors.

    In Filter By Additional Fields, enter the following:

    Field Operator Value

    Type

    contains

    SyncUploadError

    Cleared

    equals

    True

    1. In Available Fields, select the following:

      • Audit Log ID

      • Event Date

      • User

      • Message

      • Tracking Number

      • Cleared

    2. Click Add.

    Select Visible to all users.

  6. Click Save.

Auto Delete

Use the Auto Delete feature to delete Audit Log entries automatically after a set number of days.

Example 1. Possible entries to delete

Delete SyncComplete and SyncDownloadComplete entries automatically after 30 days.

This keeps the Audit Log running more efficiently and reduces your administrative burden.

Set Up the Auto Delete Feature

  1. Access FieldFX Back Office.

  2. Switch to Salesforce Classic.

  3. Configure FX Settings:

    1. From Setup, enter custom settings in the Quick Find box, then select Custom Settings.

    2. Click Manage next to FX Settings.

    3. Click Edit.

    4. In AuditLogRetainingDays, enter the number of days after occurring that you want to delete Audit Log entries.

      Enter "30" to delete entries 30 days after they occurred.

    5. In AuditLogTypeForTruncation, enter the types of Audit Log entries you want to delete automatically (use commas to separate multiple values).

      Enter SyncDownloadComplete,SyncUploadComplete to delete SyncDownloadComplete and SyncUploadComplete entries only.

      As a best practice, never select to delete LoggedOutWithData or SyncUploadError entries.

    6. Click Save.

  4. Schedule the AuditLogTruncatorScheduler Apex class:

    1. From Setup, enter apex in the Quick Find box, then select Apex Classes.

    2. Click Schedule Apex.

    3. In Job Name, enter Audit Log – Auto Delete.

    4. In Apex Class, select "AuditLogTruncatorScheduler".

    5. Select how often you want to delete old Audit Log entries.

      Select a frequency of at least once per week, preferably daily.

    6. Click Save.

Run the Auto Delete Feature Manually

  1. Access FieldFX Back Office.

  2. Access Workbench.

  3. Select Utilities | Apex Execute.

  4. Enter the following script:

    System.debug(FX5.FXBatchableLauncher.Run('FX5.AuditLogTruncator', null));
  5. Click Execute.