Table of Contents

Codeunit "Agent Task Message Builder"

ID 4316
Namespace: System.Agents

This codeunit is used to create an agent task message.

Properties

Name Value
InherentEntitlements X
InherentPermissions X

Methods

Initialize

Initialize the agent task message builder with the mandatory parameter. From value will be set to the current user.

procedure Initialize(MessageText: Text): Codeunit "Agent Task Message Builder"

Parameters

Name Type Description
MessageText Text

The text of the message.

Returns

Type Description
Codeunit System.Agents."Agent Task Message Builder"

This instance of the Agent Task Message Builder.

Initialize

Initialize the agent task message builder with the mandatory parameters.

procedure Initialize(From: Text[250], MessageText: Text): Codeunit "Agent Task Message Builder"

Parameters

Name Type Description
From Text[250]

Text indicating the sender of the message.

MessageText Text

The text of the message.

Returns

Type Description
Codeunit System.Agents."Agent Task Message Builder"

This instance of the Agent Task Message Builder.

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): Codeunit "Agent Task Message Builder"

Parameters

Name Type Description
IgnoreAttachment Boolean

Specifies if attachments should be ignored.

Returns

Type Description
Codeunit System.Agents."Agent Task Message Builder"

SetMessageExternalID

Set the external ID of the task.

procedure SetMessageExternalID(ExternalId: Text[2048]): Codeunit "Agent Task Message Builder"

Parameters

Name Type Description
ExternalId Text[2048]

The external ID of the task. This field is used to connect to external systems, like Message ID for emails.

Returns

Type Description
Codeunit System.Agents."Agent Task Message Builder"

This instance of the Agent Task Message Builder.

SetAgentTask

procedure SetAgentTask(ParentAgentTask: __MissingTypeSymbol__): Codeunit "Agent Task Message Builder"

Parameters

Name Type Description
ParentAgentTask __MissingTypeSymbol__

Returns

Type Description
Codeunit System.Agents."Agent Task Message Builder"

SetAgentTask

Set the agent task for which to create the message.

procedure SetAgentTask(ParentAgentTaskID: BigInteger): Codeunit "Agent Task Message Builder"

Parameters

Name Type Description
ParentAgentTaskID BigInteger

The ID of the agent task to set the message to.

Returns

Type Description
Codeunit System.Agents."Agent Task Message Builder"

This instance of the Agent Task Message Builder.

Create

procedure Create()

Create

procedure Create(SetTaskStatusToReady: Boolean)

Parameters

Name Type Description
SetTaskStatusToReady Boolean

GetAgentTaskMessage

procedure GetAgentTaskMessage()

AddAttachment

Attach a file to the task message. The file will be attached when the message is created. It is possible to attach multiple files to the message.

procedure AddAttachment(FileName: Text[250], FileMIMEType: Text[100], InStream: InStream): Codeunit "Agent Task Message Builder"

Parameters

Name Type Description
FileName Text[250]

The name of the file to attach.

FileMIMEType Text[100]

The MIME type of the file to attach.

InStream InStream

The stream of the file to attach.

Returns

Type Description
Codeunit System.Agents."Agent Task Message Builder"

This instance of the Agent Task Message Builder.

AddAttachment

Attach a file to the task message. The file will be attached when the message is created. It is possible to attach multiple files to the message.

procedure AddAttachment(FileName: Text[250], FileMIMEType: Text[100], InStream: InStream, Ignored: Boolean): Codeunit "Agent Task Message Builder"

Parameters

Name Type Description
FileName Text[250]

The name of the file to attach.

FileMIMEType Text[100]

The MIME type of the file to attach.

InStream InStream

The stream of the file to attach.

Ignored Boolean

Specifies if the attachment should be marked as ignored, so that it is not processed by agent.

Returns

Type Description
Codeunit System.Agents."Agent Task Message Builder"

This instance of the Agent Task Message Builder.

AddAttachment

procedure AddAttachment(AgentTaskFile: __MissingTypeSymbol__): Codeunit "Agent Task Message Builder"

Parameters

Name Type Description
AgentTaskFile __MissingTypeSymbol__

Returns

Type Description
Codeunit System.Agents."Agent Task Message Builder"

UploadAttachment

Uploads a file to the task message. The file will be attached when the message is created. It is possible to attach multiple files to the message.

procedure UploadAttachment(): Boolean

Returns

Type Description
Boolean

True if the attachment was uploaded, false otherwise.

GetLastAttachment

procedure GetLastAttachment()

GetAttachments

procedure GetAttachments(TempAttachments: __MissingTypeSymbol__): Boolean

Parameters

Name Type Description
TempAttachments __MissingTypeSymbol__

Returns

Type Description
Boolean

See also