Skip to content

FlowRecordLogEntry

FlowRecordLogEntry Class

SUPPRESSWARNINGS

Handles adding new log entries in Flow for a particular SObject record

Group Logger Engine

See FlowLogEntry

See FlowCollectionLogEntry

See FlowLogger

See Logger

See LogEntryEventBuilder

Fields

faultMessage

INVOCABLEVARIABLE

Optionally log a Flow fault error message

Signature

global faultMessage

Type

String


flowName

INVOCABLEVARIABLE

The API name of the Flow creating the log entry. Due to Salesforce limitations, this cannot be automatically determined

Signature

global flowName

Type

String


loggingLevelName

INVOCABLEVARIABLE

Optionally specify a logging level - the default is ‘DEBUG’

Signature

global loggingLevelName

Type

String


message

INVOCABLEVARIABLE

The message to log

Signature

global message

Type

String


record

INVOCABLEVARIABLE

The record to relate to this log entry - the record’s JSON is automatically added to the log entry

Signature

global record

Type

SObject


saveLog

INVOCABLEVARIABLE

Optionally choose to save any pending log entries

Signature

global saveLog

Type

Boolean


saveMethodName

INVOCABLEVARIABLE

Optionally choose the save method to use when ‘Save Log’ is true

Signature

global saveMethodName

Type

String


scenario

INVOCABLEVARIABLE

Optionally specify the name to use for the current transaction’s scenario

Signature

global scenario

Type

String


shouldThrowFaultMessageException

INVOCABLEVARIABLE

Optionally rollback Database operations executed until Apex action was called and save the log entry.

Signature

global shouldThrowFaultMessageException

Type

Boolean


tagsString

INVOCABLEVARIABLE

Optionally provide a comma-separated String of tags to dynamically assign to the log entry

Signature

global tagsString

Type

String

Methods

addFlowRecordEntries(flowRecordLogEntries)

INVOCABLEMETHOD

Invocable method for adding record entries via flow or process builder

Signature

global static List<String> addFlowRecordEntries(List<FlowRecordLogEntry> flowRecordLogEntries)

Parameters

NameTypeDescription
flowRecordLogEntriesListThe list of FlowRecordLogEntry instances to save

Return Type

List

The current transaction’s ID (based on Logger.getTransactionId() )