Skip to content

FlowLogEntry

FlowLogEntry Class

SUPPRESSWARNINGS

Handles adding new log entries in Flow

Group Logger Engine

See FlowRecordLogEntry

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


recordId

INVOCABLEVARIABLE

Optionally relate the log entry to a particular record ID

Signature

global recordId

Type

Id


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

addFlowEntries(flowLogEntries)

INVOCABLEMETHOD

Invocable method, that can be called via flow.

Signature

global static List<String> addFlowEntries(List<FlowLogEntry> flowLogEntries)

Parameters

NameTypeDescription
flowLogEntriesListThe list of FlowLogEntry instances to save

Return Type

List

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