Table of Contents

Codeunit "Agent Message"

ID 4307
Namespace: System.Agents

Properties

Name Value
InherentEntitlements X
InherentPermissions X

Methods

GetText

Get the message text for the given agent task message.

procedure GetText(TaskID: BigInteger; MessageID: Guid): Text

Parameters

Name Type Description
TaskID BigInteger

The task ID of the message.

MessageID Guid

The unique identifier of the message.

Returns

Type Description
Text

The body of the agent task message.

GetText

procedure GetText(AgentTaskMessage: __MissingTypeSymbol__): Text

Parameters

Name Type Description
AgentTaskMessage __MissingTypeSymbol__

Returns

Type Description
Text

UpdateText

Updates the message text.

procedure UpdateText(TaskID: BigInteger; MessageID: Guid; NewMessageText: Text)

Parameters

Name Type Description
TaskID BigInteger

The task ID of the message.

MessageID Guid

The unique identifier of the message.

NewMessageText Text

New message text to set.

UpdateText

Obsolete

This element will become obsolete from version 29.0. Use the overload that takes TaskID and MessageID instead.

[Obsolete(Use the overload that takes TaskID and MessageID instead.,29.0)]
procedure UpdateText(AgentTaskMessage: __MissingTypeSymbol__; NewMessageText: Text)

Parameters

Name Type Description
AgentTaskMessage __MissingTypeSymbol__
NewMessageText Text

IsEditable

Check if it is possible to edit the message.

procedure IsEditable(TaskID: BigInteger; MessageID: Guid): Boolean

Parameters

Name Type Description
TaskID BigInteger

The task ID of the message.

MessageID Guid

The unique identifier of the message.

Returns

Type Description
Boolean

If it is possible to change the message.

IsEditable

procedure IsEditable(AgentTaskMessage: __MissingTypeSymbol__): Boolean

Parameters

Name Type Description
AgentTaskMessage __MissingTypeSymbol__

Returns

Type Description
Boolean

SetStatusToSent

Sets the message status to sent.

procedure SetStatusToSent(TaskID: BigInteger; MessageID: Guid)

Parameters

Name Type Description
TaskID BigInteger

The task ID of the message.

MessageID Guid

The unique identifier of the message.

SetStatusToSent

Obsolete

This element will become obsolete from version 29.0. Use the overload that takes TaskID and MessageID instead.

[Obsolete(Use the overload that takes TaskID and MessageID instead.,29.0)]
procedure SetStatusToSent(AgentTaskMessage: __MissingTypeSymbol__)

Parameters

Name Type Description
AgentTaskMessage __MissingTypeSymbol__

SetIgnoreAttachment

Set whether to ignore attachments for the message. When set to true, attachments will be marked as ignored and will not be processed by the agent. The default value is false.

procedure SetIgnoreAttachment(IgnoreAttachment: Boolean)

Parameters

Name Type Description
IgnoreAttachment Boolean

If true, attachments will be marked as ignored when added to a message.

DownloadAttachments

procedure DownloadAttachments(AgentTaskMessage: __MissingTypeSymbol__)

Parameters

Name Type Description
AgentTaskMessage __MissingTypeSymbol__

ShowAttachment

Shows the attachments for a specific message. If file is not supported to be shown, it will be downloaded.

procedure ShowAttachment(TaskID: BigInteger; FileID: BigInteger)

Parameters

Name Type Description
TaskID BigInteger

Task ID to download attachments for.

FileID BigInteger

File ID to download.

ShowAttachment

procedure ShowAttachment(AgentTaskFile: __MissingTypeSymbol__)

Parameters

Name Type Description
AgentTaskFile __MissingTypeSymbol__

GetAttachments

procedure GetAttachments(TaskID: BigInteger; MessageID: Guid; TempAgentTaskFile: __MissingTypeSymbol__)

Parameters

Name Type Description
TaskID BigInteger
MessageID Guid
TempAgentTaskFile __MissingTypeSymbol__

GetFileSizeDisplayText

Get the display text for the file size.

procedure GetFileSizeDisplayText(SizeInBytes: Decimal): Text

Parameters

Name Type Description
SizeInBytes Decimal

The size in bytes.

Returns

Type Description
Text

The display text for the file size.

See also