Table of Contents

Codeunit "Retention Policy Log"

ID 3908
Namespace: System.DataAdministration

This codeunit provides functions for logging error, warning, and informational messages to the Retention Policy Log Entry table.

Properties

Name Value
Access Public

Methods

LogError

LogError will create an entry in the Retention Policy Log Entry table with Message Type set to Error. An error message will be displayed to the user and any changes in the current transaction will be reverted.

procedure LogError(Category: Enum "Retention Policy Log Category", Message: Text[2048])

Parameters

Name Type Description
Category Enum System.DataAdministration."Retention Policy Log Category"

The category for which to log the message.

Message Text[2048]

The message to log.

LogError

LogError will create an entry in the Retention Policy Log Entry table with Message Type set to Error. If DisplayError is true, an error message will be displayed to the user and any changes in the current transaction will be rolled back. If DisplayError is false, no error is displayed, the code continues to run, and no changes are reverted.

procedure LogError(Category: Enum "Retention Policy Log Category", Message: Text[2048], DisplayError: Boolean)

Parameters

Name Type Description
Category Enum System.DataAdministration."Retention Policy Log Category"

The category for which to log the message.

Message Text[2048]

The message to log.

DisplayError Boolean

Specifies whether the error is displayed.

LogWarning

LogWarning will create an entry in the Retention Policy Log Entry table with Message Type set to Warning. No message is displayed to the user.

procedure LogWarning(Category: Enum "Retention Policy Log Category", Message: Text[2048])

Parameters

Name Type Description
Category Enum System.DataAdministration."Retention Policy Log Category"

The category for which to log the message.

Message Text[2048]

The message to log.

LogInfo

LogInfo will create an entry in the Retention Policy Log Entry table with Message Type set to Info. No message is displayed to the user.

procedure LogInfo(Category: Enum "Retention Policy Log Category", Message: Text[2048])

Parameters

Name Type Description
Category Enum System.DataAdministration."Retention Policy Log Category"

The category for which to log the message.

Message Text[2048]

The message to log.

See also