FormulaShare Logs

Logs are captured to show the successful and failed share insert and delete operations at a record level, as well as a summary of the batch run and rules applied for each object. The system of objects holding these logs is explained below:

Logging objects

List views of Batch Logs and Record Logs can be configured in the FormulaShare app, and all objects above are available for reporting. Note that FormulaShare Metrics are used by the rules list view to display rule totals, and although they are available for reports, are out of scope of this guide.

 

Batch Logs

A batch log is created for each object each time that a full recalculation of that object takes place - either as part of the regular scheduled job or on demand when initiated from the FormulaShare Rules list. A typical batch log is shown below:

Batch Rule Detail

The "Rules in Batch" related list shows all the rules which were set up at the time the batch ran, and indicates which of these were active at that point in time.

The FormulaShare Record Logs related list includes logs for all records which had updates made as part of this batch (see below for information captured in these).

 

Record Logs

Record Logs show the trigger or batch processing carried out for a record, and summarises whether all attempted sharing inserts or deletions took place successfully:

Record Log Detail


There's a few things to know about what's shown here:

  • Context will be one of the following:
    • Record Triggered Flow - Assessment from a record-triggered flow where the FormulaShare action with "Process Records which Triggered the Flow" option is used
    • Requested via Flow - Assessment from a non-record-triggered flow, or from a record-triggered flow where the FormulaShare action with "Process Other Records" option is used
    • Apex Trigger - Assessment from an apex trigger, where the FormulaShareHelper is constructed without passing records explicitly
    • Requested via Apex - Assessment from apex, where specific records to be processed are passed via the FormulaShareHelper constructor
    • Full Recalculation Batch - Assessment from the regular scheduled batch job
    • Targeted Calculation Job - Assessment from a Targeted Calculation Job
    • Manually Initiated Batch - Assessment from selecting "Recalculate Sharing" option for an object from the FormulaShare Rules tab
  • The Record field hyperlinks to the shared record so can be useful to investigate the context of the sharing
  • The Processed Record Shares related list has records representing the individual share insert and delete actions attempted as part of the processing. The status reflects whether or not the share was actually inserted or removed, and status reason is provided in the Processed Record Share itself to indicate why any sharing change wasn't made. See the errors and warnings section for more detail on reasons which can arise

 

Removal of logs

Jobs are run as part of scheduled batch processing to clean up older log records. This is done to avoid unnecessarily contributing to data volumes in your org.

Under the default retention times, batch logs and rule in batch records will be kept for 365 days, and record logs and processed record shares will be kept for 8 days.

To modify these retention periods, or to deactivate the creation of logs altogether, refer to App-Wide Settings.

 

A note on security

Logging objects are shared with all users with the FormulaShare Admin User permission set. Whilst only very limited information relating to the org's data can be viewed in these logs it's recommended to avoid giving access to users other than trusted administrators.