---
id: object/codeunit/7251
type: object
title: Codeunit 7251 "Bank Acc. Rec. Trans. to Acc."
summary: Codeunit 7251 "Bank Acc. Rec. Trans. to Acc." in BankAccRecWithAI (Microsoft.Bank.Reconciliation). 14 public procedures, 1 event subscribers. Introduced in BC29, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - bankaccrecwithai
versions:
  introduced: "29"
  last_changed: null
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: f00128c0a45e0eb2fd755988a075acd5c6885e0efd859d8e9a848865e250f2b3
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/BankAccRecWithAI/app/src/BankAccRecTransToAcc.Codeunit.al
    title: src/Apps/W1/BankAccRecWithAI/app/src/BankAccRecTransToAcc.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/10090
object_type: codeunit
object_id: 7251
name: Bank Acc. Rec. Trans. to Acc.
namespace: Microsoft.Bank.Reconciliation
app: BankAccRecWithAI
extends: null
first_version: "29"
last_version: "30"
present_in:
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 17
  events: 0
  subscribers: 1
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 14
  called_by: 2
  implements: 0
---

# Codeunit 7251 "Bank Acc. Rec. Trans. to Acc."

> Codeunit 7251 "Bank Acc. Rec. Trans. to Acc." in BankAccRecWithAI (Microsoft.Bank.Reconciliation). 14 public procedures, 1 event subscribers. Introduced in BC29, still in BC30.

BankAccRecWithAI · Microsoft.Bank.Reconciliation · BC29-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/BankAccRecWithAI/app/src/BankAccRecTransToAcc.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Access | Internal |

## Event subscriptions

- InsertStatementMatchingBufferOnAfterPostGenJournalLine subscribes to Codeunit "Gen. Jnl.-Post Batch" OnAfterPostGenJournalLine

## Procedures

- `GetMostAppropriateGLAccountNos(var BankAccReconciliationLine: Record "Bank Acc. Reconciliation Line"; var TempBankStatementMatchingBuffer: Record "Bank Statement Matching Buffer" temporary): Dictionary of [Integer, Code[20]]`
- `ProcessCompletionAnswer(var CompletionAnswerTxt: Text; var Result: Dictionary of [Integer, Code[20]])`
- `InsertTextToAccountMapping(var TempBankAccRecAIPropBuf: Record "Bank Acc. Rec. AI Prop. Buf." temporary)`
- `InsertTextToAccountMapping(TextToInsert: Text[100]; GLAccountNo: Code[20])`
- `BuildMostAppropriateGLAccountPromptTask(): SecretText`
- `BuildGLAccounts(var GLAccount: Record "G/L Account"): Text`
- `BuildBankRecStatementLines(var BankAccReconciliationLine: Record "Bank Acc. Reconciliation Line"; var TempBankStatementMatchingBuffer: Record "Bank Statement Matching Buffer" temporary): Text`
- `GenerateTransferToGLAccountProposals(var TempBankAccRecAIProposal: Record "Bank Acc. Rec. AI Proposal" temporary; var BankAccReconciliationLine: Record "Bank Acc. Reconciliation Line"; var TempBankStatementMatchingBuffer: Record "Bank Statement Matching Buffer" temporary)`
- `PostNewPaymentsToProposedGLAccounts(var TempBankAccRecAIProposal: Record "Bank Acc. Rec. AI Proposal" temporary; var TempBankStatementMatchingBuffer: Record "Bank Statement Matching Buffer" temporary; var TransToGLAccJnlBatch: Record "Trans. to G/L Acc. Jnl. Batch"): Integer`
- `CopyStatementMatchingBuffer(var TempBankStatementMatchingBuffer: Record "Bank Statement Matching Buffer" temporary)` (internal)
- `BuildBankRecCompletionPrompt(TaskPrompt: SecretText; StatementLine: Text; GLAccounts: Text): SecretText`
- `BuildBankRecPromptUserMessage(StatementLine: Text; GLAccounts: Text): SecretText`
- `FoundInputWithReservedWords(): Boolean`
- `GetStatementLinesWithDisallowedDatesLbl(): Text` (internal)

Plus 2 local procedures.

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 7250 "Bank Rec. AI Matching Impl."](../codeunit/7250.md) (7 calls: `BuildBankRecStatementLines → HasReservedWords`, `BuildGLAccounts → HasReservedWords`, `BuildMostAppropriateGLAccountPromptTask → AddCompletionPromptLine`, …)
- [Codeunit 7770 "AOAI Operation Response"](../codeunit/7770.md) (4 calls: `GetMostAppropriateGLAccountNos → GetError`, `GetMostAppropriateGLAccountNos → GetResult`, `GetMostAppropriateGLAccountNos → GetStatusCode`, …)
- [Codeunit 7771 "Azure OpenAI"](../codeunit/7771.md) (4 calls: `GetCompletionResponse → GenerateChatCompletion`, `GetMostAppropriateGLAccountNos → IsEnabled`, `GetMostAppropriateGLAccountNos → SetAuthorization`, …)
- [Codeunit 7761 "AOAI Chat Completion Params"](../codeunit/7761.md) (3 calls: `GetMostAppropriateGLAccountNos → SetAOAIPolicyParams`, `GetMostAppropriateGLAccountNos → SetMaxTokens`, `GetMostAppropriateGLAccountNos → SetTemperature`)
- [Codeunit 7763 "AOAI Chat Messages"](../codeunit/7763.md) (3 calls: `GetCompletionResponse → AddSystemMessage`, `GetCompletionResponse → AddUserMessage`, `GetCompletionResponse → AddXPIADetectionTags`)
- [Codeunit 7787 "AOAI Policy Params"](../codeunit/7787.md) (2 calls: `GetMostAppropriateGLAccountNos → SetHarmsSeverity`, `GetMostAppropriateGLAccountNos → SetXPIADetection`)
- [Codeunit 8703 "Feature Telemetry"](../codeunit/8703.md) (2 calls: `GetMostAppropriateGLAccountNos → LogUptake`, `GetMostAppropriateGLAccountNos → LogUsage`)
- [Codeunit 1251 "Record Match Mgt."](../codeunit/1251.md) (1 call: `GetMostAppropriateGLAccountNos → Trim`)
- [Codeunit 1252 "Match Bank Rec. Lines"](../codeunit/1252.md) (1 call: `PostNewPaymentsToProposedGLAccounts → SaveOneToOneMatching`)
- [Codeunit 13 "Gen. Jnl.-Post Batch"](../codeunit/13.md) (1 call: `PostNewPaymentsToProposedGLAccounts → (object)`)
- [Codeunit 308 "No. Series - Batch"](../codeunit/308.md) (1 call: `GetDocumentNo → GetNextNo`)
- [Codeunit 5700 "User Setup Management"](../codeunit/5700.md) (1 call: `PostNewPaymentsToProposedGLAccounts → IsPostingDateValidWithGenJnlTemplate`)
- [Codeunit 7768 "AOAI Deployments"](../codeunit/7768.md) (1 call: `GetMostAppropriateGLAccountNos → GetGPT41Latest`)
- [Page 1251 "Text-to-Account Mapping"](../page/1251.md) (1 call: `InsertTextToAccountMapping → (object)`)

## Called by

- [Page 7252 "Trans. To GL Acc. AI Proposal"](../page/7252.md) (4 calls: `GenerateTransferToGLAccountProposals → FoundInputWithReservedWords`, `GenerateTransferToGLAccountProposals → GenerateTransferToGLAccountProposals`, `PostNewPaymentsToProposedGLAccounts → PostNewPaymentsToProposedGLAccounts`, …)
- [Page 7251 "Bank Acc. Rec. AI Proposal Sub"](../page/7251.md) (1 call: `SaveToTextToAccountMapping → InsertTextToAccountMapping`)

## Recent changes

- 2026-08-11 [#10090 [Bank Acc. Reconciliation with Copilot] Read the functional part of the prompt from .resources and safety clause from Key Vault](../../changes/bcapps/10090.md) (main, BC30, refactor)

## Across versions

- Present in: BC29-30
- Changed (declaration) in: none

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "Bank Acc. Rec. Trans. to Acc.")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
