---
title: "Codeunit 3307 Payables Agent Setup"
author: "JOP-AL"
url: https://jonas-paprotka.de/ref/codeunit/3307-payables-agent-setup/
type: codeunit
id: 3307
name: "Payables Agent Setup"
app: "Payables Agent"
namespace: Microsoft.Agent.PayablesAgent
versions: "26-29"
build: 29.0.54011.55644
countries: "W1, DE, US"
source: "https://jonas-paprotka.de/ref/codeunit/3307-payables-agent-setup/source/"
checked: 2026-11-20
changed: 2026-10-24
subject: "Microsoft Dynamics 365 Business Central"
license: "Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/"
---

# Codeunit 3307 Payables Agent Setup

JOP-AL, https://jonas-paprotka.de/ref/codeunit/3307-payables-agent-setup/

| | |
| --- | --- |
| App | Payables Agent |
| Namespace | Microsoft.Agent.PayablesAgent |
| Versions | 26-29 |
| Minors | W1 26.2, 27.0-29.0; DE 27.3-29.0; US 26.2-29.0, [every minor](https://jonas-paprotka.de/ref/codeunit/3307-payables-agent-setup/editions.json) |
| Access | Internal |
| Source file | Setup/PayablesAgentSetup.Codeunit.al |

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| LoadSetupConfiguration | (var PASetupConfiguration: Codeunit "PA Setup Configuration") | - | public | 26-29 | - | - |
| ApplyPayablesAgentSetup | (var PASetupConfiguration: Codeunit "PA Setup Configuration") | - | public | 26-29 | - | - |
| WasEDocumentCreatedByAgent | (EDocument: Record "E-Document") | Boolean | public | 26-29 | - | - |
| GetAgent | (var Agent: Record Agent) | Boolean | public | 26-29 | - | - |
| SetAgentInstructions | (AgentUserSecurityId: Guid) | - | internal | 26-29 | - | - |
| TestEmailConnection | (OutlookSetup: Record "Outlook Setup") | Boolean | public | 26 | - | - |
| GetOrCreateAgentEDocumentService | () | Record E-Document Service | public | 27-29 | - | - |
| AllowCreateNewAgent | () | Boolean | internal | 27-29 | - | - |
| GetDefaultProfile | (var TempAllProfile: Record "All Profile" temporary) | - | internal | 27-29 | - | - |
| GetDefaultAccessControls | (var TempAccessControlBuffer: Record "Access Control Buffer" temporary) | - | internal | 27-29 | - | - |
| FeatureName | () | Text | internal | 27-29 | - | - |
| GetAgent | (var Agent: Record Agent; UpdateSetup: Boolean) | Boolean | public | 28-29 | - | - |
| CanShowAgentActions | () | Boolean | internal | 28-29 | - | - |
| InsertAccessControlForEligibleUsers | (AgentUserSecurityId: Guid) | - | internal | 28-29 | - | - |
| AgentUserName | () | Code[50] | internal | 28-29 | - | - |
| AgentDisplayName | () | Text[80] | internal | 28-29 | - | - |
| AgentSummary | () | Text | internal | 28-29 | - | - |
| EnsureAgentActivated | (var AlreadyActivated: Boolean) | - | internal | 28-29 | - | - |
| HasUserCreatedPostedPurchInvoice | () | Boolean | internal | 28-29 | - | - |
| GetUsersThatHaveCreatedPostedPurchInvoice | () | List | internal | 28-29 | - | - |
| ImportInvoiceFile | (FileName: Text; InStream: InStream) | - | public | 28-29 | - | - |
| ShouldRequestReview | (EDocument: Record "E-Document") | Boolean | public | 28-29 | - | - |
| IsSenderRejected | (EDocument: Record "E-Document") | Boolean | public | 28-29 | - | - |
| IsSenderAuthenticated | (EDocument: Record "E-Document") | Boolean | public | 28-29 | - | - |
| IsSenderInternal | (EDocument: Record "E-Document") | Boolean | public | 28-29 | - | - |
| CompAuthPassed | (AuthenticationResults: Text) | Boolean | public | 28-29 | - | - |
| ClassifyKnownSendersUnusedByChange | (NewPolicy: Enum "PA Email Review Policy"; NewMonitoredFolder: Text; var KnownSendersCount: Integer) | Enum PA Setup Change Impact | public | 28-29 | - | - |
| ClassifyKnownSendersUnusedReason | (SavedPolicy: Enum "PA Email Review Policy"; SavedMonitoredFolder: Text) | Enum PA Setup Change Impact | public | 28-29 | - | - |
| PolicyLabel | (Policy: Enum "PA Email Review Policy") | Text | public | 28-29 | - | - |
| IsAgentDrivenLineMatchingEnabled | () | Boolean | internal | 29 | - | - |
| EnsureAgentInstructionsMatchConfiguration | (AgentUserSecurityId: Guid) | - | internal | 29 | - | - |
| TryEnsureAgentInstructionsMatchConfiguration | (AgentUserSecurityId: Guid) | Boolean | internal | 29 | - | - |
| GetInstructionsConfigHash | () | Text | internal | 29 | - | - |

## Source

Symbols: Microsoft.PayablesAgent.symbols.14aa1237-2f69-4c25-9a68-fa7d54e08613, https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json, highest build per major on 2026-11-20.
AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at 4303e5e584d3aa5d9e98cbc615525a5396ad6ed7.

JOP-AL, 2026-11-20.
