Table of Contents

Codeunit Agent

ID 4321
Namespace: System.Agents

Properties

Name Value
InherentEntitlements X
InherentPermissions X

Methods

Create

procedure Create(AgentMetadataProvider: __MissingTypeSymbol__, var UserName: Code[50], UserDisplayName: Text[80], TempAgentAccessControl: __MissingTypeSymbol__): Guid

Parameters

Name Type Description
AgentMetadataProvider __MissingTypeSymbol__
UserName Code[50]
UserDisplayName Text[80]
TempAgentAccessControl __MissingTypeSymbol__

Returns

Type Description
Guid

Activate

Activates the agent

procedure Activate(AgentUserSecurityID: Guid)

Parameters

Name Type Description
AgentUserSecurityID Guid

The user security ID of the agent.

Deactivate

Deactivates the agent

procedure Deactivate(AgentUserSecurityID: Guid)

Parameters

Name Type Description
AgentUserSecurityID Guid

The user security ID of the agent.

GetDisplayName

Get the display name of the agent.

procedure GetDisplayName(AgentUserSecurityID: Guid): Text[80]

Parameters

Name Type Description
AgentUserSecurityID Guid

The user security ID of the agent.

Returns

Type Description
Text[80]

GetUserName

Get the user name of the agent.

procedure GetUserName(AgentUserSecurityID: Guid): Code[50]

Parameters

Name Type Description
AgentUserSecurityID Guid

The user security ID of the agent.

Returns

Type Description
Code[50]

SetDisplayName

Sets the display name of the agent.

procedure SetDisplayName(AgentUserSecurityID: Guid, DisplayName: Text[80])

Parameters

Name Type Description
AgentUserSecurityID Guid

The user security ID of the agent.

DisplayName Text[80]

The display name of the agent.

SetInstructions

Set the instructions which agent will use to complete the tasks.

procedure SetInstructions(AgentUserSecurityID: Guid, Instructions: SecretText)

Parameters

Name Type Description
AgentUserSecurityID Guid
Instructions SecretText

Instructions for the agent that will be used to complete the tasks.

IsActive

Checks if the agent is active.

procedure IsActive(AgentUserSecurityID: Guid): Boolean

Parameters

Name Type Description
AgentUserSecurityID Guid

The user security ID of the agent.

Returns

Type Description
Boolean

If the agent is active.

PopulateDefaultProfile

procedure PopulateDefaultProfile(ProfileID: Text[30], ProfileAppID: Guid, TempAllProfile: __MissingTypeSymbol__)

Parameters

Name Type Description
ProfileID Text[30]
ProfileAppID Guid
TempAllProfile __MissingTypeSymbol__

SetProfile

Assigns the profile to the agent.

procedure SetProfile(AgentUserSecurityID: Guid, ProfileID: Text, ProfileAppID: Guid)

Parameters

Name Type Description
AgentUserSecurityID Guid

The user security ID of the agent.

ProfileID Text

The profile ID.

ProfileAppID Guid

The profile App ID.

UpdateLocalizationSettings

Updates the Language, Regional Settings and Time Zone for the agent.

procedure UpdateLocalizationSettings(AgentUserSecurityID: Guid, LanguageID: Integer, LocaleID: Integer, TimeZone: Text[180])

Parameters

Name Type Description
AgentUserSecurityID Guid

The user security ID of the agent.

LanguageID Integer

The language ID to set.

LocaleID Integer

The locale ID to set.

TimeZone Text[180]

The time zone to set.

GetUserSettings

Gets the user settings for the agent. Few properties are retrieved, like: Profile, Language, Regional Settings and Time Zone.

procedure GetUserSettings(AgentUserSecurityID: Guid, var UserSettingsRec: Record "User Settings" temporary)

Parameters

Name Type Description
AgentUserSecurityID Guid

The user security ID of the agent.

UserSettingsRec Table System.Environment.Configuration."User Settings"

The user settings for the agent. If agent is not created yet, it will use the current user settings

UpdateAccessControl

procedure UpdateAccessControl(AgentUserSecurityID: Guid, TempAccessControlBuffer: __MissingTypeSymbol__)

Parameters

Name Type Description
AgentUserSecurityID Guid
TempAccessControlBuffer __MissingTypeSymbol__

GetAccessControl

procedure GetAccessControl(AgentUserSecurityID: Guid, TempAccessControlBuffer: __MissingTypeSymbol__)

Parameters

Name Type Description
AgentUserSecurityID Guid
TempAccessControlBuffer __MissingTypeSymbol__

GetAgentAccessControl

procedure GetAgentAccessControl(AgentUserSecurityID: Guid, TempAgentAccessControl: __MissingTypeSymbol__)

Parameters

Name Type Description
AgentUserSecurityID Guid
TempAgentAccessControl __MissingTypeSymbol__

UpdateAgentAccessControl

procedure UpdateAgentAccessControl(AgentUserSecurityID: Guid, TempAgentAccessControl: __MissingTypeSymbol__)

Parameters

Name Type Description
AgentUserSecurityID Guid
TempAgentAccessControl __MissingTypeSymbol__

See also