---
title: "Codeunit 4301 Agent Impl."
author: "Jonas Paprotka"
url: https://jonas-paprotka.de/ref/codeunit/4301-agent-impl/
type: codeunit
id: 4301
name: "Agent Impl."
app: "System Application"
namespace: System.Agents
versions: "25-28"
build: 28.5.54151.54365
source: "https://jonas-paprotka.de/ref/codeunit/4301-agent-impl/source/25/ https://jonas-paprotka.de/ref/codeunit/4301-agent-impl/source/26/ https://jonas-paprotka.de/ref/codeunit/4301-agent-impl/source/27/ https://jonas-paprotka.de/ref/codeunit/4301-agent-impl/source/28/ https://jonas-paprotka.de/ref/codeunit/4301-agent-impl/source/29/"
checked: 2026-09-20
subject: "Microsoft Dynamics 365 Business Central"
license: "Content © 2026 Jonas Paprotka. Quote freely with attribution and a link."
---

# Codeunit 4301 Agent Impl.

Jonas Paprotka, https://jonas-paprotka.de/ref/codeunit/4301-agent-impl/

| | |
| --- | --- |
| App | System Application |
| Namespace | System.Agents |
| Versions | 25-28 |
| Source file | Agent/Setup/AgentImpl.Codeunit.al |

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| CreateAgent | (Enum Agent Metadata Provider, Code[50], Text[80], var Record Agent Access Control) | Guid | internal | 25-26 | - | - |
| Activate | (Guid) | - | public | 25-28 | - | - |
| Deactivate | (Guid) | - | public | 25-28 | - | - |
| SetInstructions | (Guid, SecretText) | - | internal | 25-26 | - | - |
| GetInstructions | (var Record Agent) | Text | internal | 25 | - | - |
| InsertCurrentOwnerIfNoOwnersDefined | (var Record Agent, var Record Agent Access Control) | - | internal | 25-26 | - | - |
| InsertCurrentOwner | (Guid, var Record Agent Access Control) | - | internal | 25-26 | - | - |
| VerifyOwnerExists | (Record Agent Access Control) | - | internal | 25-26 | - | - |
| GetUserAccess | (Guid, var Record Agent Access Control) | - | public | 25-28 | - | - |
| SetProfile | (Guid, var Record All Profile) | - | public | 25-28 | - | - |
| AssignCompany | (Guid, Text) | - | internal | 25-26 | - | - |
| GetUserName | (Guid) | Code[50] | public | 25-28 | - | - |
| GetDisplayName | (Guid) | Text[80] | public | 25-28 | - | - |
| SetDisplayName | (Guid, Text[80]) | - | public | 25-28 | - | - |
| IsActive | (Guid) | Boolean | public | 25-28 | - | - |
| UpdateAgentAccessControl | (Guid, var Record Agent Access Control) | - | public | 25-28 | - | - |
| UpdateAgentUserSettings | (Record User Settings) | - | public | 25-28 | - | - |
| ProfileLookup | (var Record User Settings) | Boolean | public | 25-28 | - | - |
| UpdateProfile | (var Record All Profile, var Record User Settings) | - | internal | 25-26 | - | - |
| PopulateProfiles | (var Record All Profile) | - | public | 25-26 | - | - |
| GetProfileName | (Option, Guid, Code[30]) | Text | public | 25-26 | - | - |
| AssignPermissionSets | (var Guid, Text, var Record Aggregate Permission Set) | - | internal | 25-26 | - | - |
| SelectAgent | (var Record Agent) | - | public | 25-28 | - | - |
| GetInstructions | (Guid) | SecretText | internal | 26 | - | - |
| ShowNoAgentsAvailableNotification | () | - | public | 26-28 | - | - |
| OpenNoAgentsLearnMore | (Notification) | - | public | 26-28 | - | - |
| CreateAgent | (Enum Agent Metadata Provider, var Code[50], Text[80], var Record Agent Access Control) | Guid | public | 27-28 | - | - |
| PopulateProfileTempRecord | (Text[30], Guid, var Record All Profile) | - | public | 27-28 | - | - |
| SetProfile | (Guid, Text, Guid) | - | public | 27-28 | - | - |
| UpdateLocalizationSettings | (Guid, Integer, Integer, Text[180]) | - | public | 27-28 | - | - |
| UpdateLocalizationSettings | (Guid, var Record User Settings) | - | public | 27-28 | - | - |
| GetUserSettings | (Guid, var Record User Settings) | - | public | 27-28 | - | - |
| CanShowMonetizationData | () | Boolean | public | 27 | - | - |
| AssignPermissionSets | (var Guid, var Record Access Control Buffer) | - | public | 27-28 | - | - |
| GetPermissionSets | (Guid, var Record Access Control Buffer) | - | public | 27-28 | - | - |
| GetAgent | (var Record Agent, Guid) | - | public | 27-28 | - | - |
| OpenSetupPageId | (Enum Agent Metadata Provider, Guid) | - | public | 27-28 | - | - |
| GetAccessControlForSingleCompany | (Guid, var Text[30]) | Boolean | public | 27-28 | - | - |
| GetCopilotAvailabilityDisplayText | (Record Agent) | Text | public | 27-28 | - | - |
| GetModelId | (Guid) | Code[30] | public | 28 | - | - |
| GetModelName | (Guid) | Text[70] | public | 28 | - | - |
| SetModelId | (Guid, Code[30]) | - | public | 28 | - | - |
| SetModelIdToAuto | (Guid) | - | public | 28 | - | - |
| SelectAgent | (var Record Agent, Boolean) | - | public | 28 | - | - |

## Source

Symbols: Microsoft.SystemApplication.symbols.63ca2fa4-4f03-4f2b-a480-172fef340d3f, https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json, highest build per major on 2026-09-20.
AL source 25: https://github.com/microsoft/BCApps, MIT, releases/25.x at 68d52c129129c83b2e396a473aaa5b2ce61d2eed.
AL source 26: https://github.com/microsoft/BCApps, MIT, releases/26.x at 78c4acf0d64a8eee157ea80164fa8fc2acffc9eb.
AL source 27: https://github.com/microsoft/BCApps, MIT, releases/27.x at 1749020b4c9445a43e4f7f540e89b7fa76ec25fd.
AL source 28: https://github.com/microsoft/BCApps, MIT, releases/28.x at 740f59156b249f8ed7cba2e28423f03ae7b07233.
AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at a66254c3b8b5bb1cea290dc8f9d097aec4381153.

Jonas Paprotka, 2026-09-20.
