Codeunit "Agent Setup"
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"; 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 |
CopySetupRecord
Copies the setup record from the source buffer to the target buffer.
procedure CopySetupRecord(var Target: Record "Agent Setup Buffer"; var Source: Record "Agent Setup Buffer")
Parameters
| Name | Type | Description |
|---|---|---|
| Target | Table System.Agents."Agent Setup Buffer" |
|
| Source | Table System.Agents."Agent Setup Buffer" |
|
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"): Guid
Parameters
| Name | Type | Description |
|---|---|---|
| AgentSetupBuffer | Table System.Agents."Agent Setup Buffer" |
|
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"): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| AgentSetupBuffer | Table System.Agents."Agent Setup Buffer" |
|
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"): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| AgentSetupBuffer | Table System.Agents."Agent Setup Buffer" |
|
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"): Text
Parameters
| Name | Type | Description |
|---|---|---|
| AgentSetupBuffer | Table System.Agents."Agent Setup Buffer" |
|
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"): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| AgentSetupBuffer | Table System.Agents."Agent Setup Buffer" |
|
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"): 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. |
FindAgentByUserName
Finds the agent user security ID based on the provided user name.
procedure FindAgentByUserName(AgentUserName: Text; var AgentUserSecurityId: Guid): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| AgentUserName | Text |
The user name to search for. You can provide a partial or full user name. |
| AgentUserSecurityId | Guid |
The security ID of the agent user if found, otherwise a null guid. |
Returns
| Type | Description |
|---|---|
| Boolean |
True if an agent with the provided user name is found, false otherwise. |
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")
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. |