Table of Contents

Codeunit "Agent Setup"

ID 4324
Namespace: System.Agents

Used for setting up new agents and configuring existing agents.

Properties

Name Value
InherentEntitlements X
InherentPermissions X

Methods

GetSetupRecord

procedure GetSetupRecord(var AgentSetupBuffer: Record "Agent Setup Buffer" temporary, UserSecurityID: Guid, AgentMetadataProvider: __MissingTypeSymbol__, DefaultUserName: Code[50], DefaultDisplayName: Text[80], AgentSummary: Text)

Parameters

Name Type Description
AgentSetupBuffer Table System.Agents."Agent Setup Buffer"
UserSecurityID Guid
AgentMetadataProvider __MissingTypeSymbol__
DefaultUserName Code[50]
DefaultDisplayName Text[80]
AgentSummary Text

SaveChanges

Saves changes done. If the agent does not exist we will create a new agent otherwise we will update the agent.

procedure SaveChanges(var AgentSetupBuffer: Record "Agent Setup Buffer" temporary): Guid

Parameters

Name Type Description
AgentSetupBuffer Table System.Agents."Agent Setup Buffer"

that contains the setup data.

Returns

Type Description
Guid

Agent User ID of the created or updated agent.

GetChangesMade

Checks if there are any changes made in the setup buffer that need to be saved.

procedure GetChangesMade(var AgentSetupBuffer: Record "Agent Setup Buffer" temporary): Boolean

Parameters

Name Type Description
AgentSetupBuffer Table System.Agents."Agent Setup Buffer"

that contains the setup data.

Returns

Type Description
Boolean

True if there are changes made, false otherwise.

OpenLanguageAndRegionPage

Opens a page where the language and region settings for the agent can be updated.

procedure OpenLanguageAndRegionPage(var AgentSetupBuffer: Record "Agent Setup Buffer" temporary): Boolean

Parameters

Name Type Description
AgentSetupBuffer Table System.Agents."Agent Setup Buffer"

that contains the setup data.

Returns

Type Description
Boolean

True if the language and region settings were updated, false otherwise.

GetAgentSummary

Retrieves the summary information about the agent.

procedure GetAgentSummary(var AgentSetupBuffer: Record "Agent Setup Buffer" temporary): Text

Parameters

Name Type Description
AgentSetupBuffer Table System.Agents."Agent Setup Buffer"

that contains the setup data.

Returns

Type Description
Text

Summary information about the agent.

OpenAgentAccessControlPage

Opens a page where the user access control settings for the agent can be updated.

procedure OpenAgentAccessControlPage(var AgentSetupBuffer: Record "Agent Setup Buffer" temporary): Boolean

Parameters

Name Type Description
AgentSetupBuffer Table System.Agents."Agent Setup Buffer"

that contains the setup data.

Returns

Type Description
Boolean

True if the user access control settings were updated, false otherwise.

OpenProfileLookup

Allows the user to select a profile out of the list of available profiles. The user settings record will be updated with the selected profile.

procedure OpenProfileLookup(var UserSettingsRec: Record "User Settings" temporary): Boolean

Parameters

Name Type Description
UserSettingsRec Table System.Environment.Configuration."User Settings"

User settings to update with the new profile

Returns

Type Description
Boolean

OpenAgentLookup

Allows the user to select an agent out of the list of enabled agents.

procedure OpenAgentLookup(var AgentUserSecurityId: Guid): Boolean

Parameters

Name Type Description
AgentUserSecurityId Guid

Returns

Type Description
Boolean

The security ID of the selected agent or the empty guid if none selected.

OpenAgentLookup

procedure OpenAgentLookup(AgentType: __MissingTypeSymbol__, var AgentUserSecurityId: Guid): Boolean

Parameters

Name Type Description
AgentType __MissingTypeSymbol__
AgentUserSecurityId Guid

Returns

Type Description
Boolean

OpenSetupPage

Opens the setup page for the agent.

procedure OpenSetupPage(var AgentSetupBuffer: Record "Agent Setup Buffer" temporary)

Parameters

Name Type Description
AgentSetupBuffer Table System.Agents."Agent Setup Buffer"

A record that should point to the agent.

OpenSetupPage

Opens the setup page for the agent.

procedure OpenSetupPage(AgentUserSecurityId: Guid)

Parameters

Name Type Description
AgentUserSecurityId Guid

The user security ID of the agent.

See also