---
id: change/bcapps/14148
type: change
title: "#14148 Only skip draft preparation for the Payables Agent's own e-documents with agent-driven line matching"
summary: Draft preparation skip now applies only to the Payables Agent's own e-documents when agent-driven line matching is enabled, restoring normal preparation for other e-document services.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit prepare purchase e-doc. draft
system: integration
review:
  state: reviewed
  by: opus
  at: "2026-11-21T00:56:47.755Z"
  flags: []
generated:
  at: "2026-12-01T00:17:57.990Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 090a86dcb619b83faae78367bdab3f5effe14742
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/14148
    title: "microsoft/BCApps#14148: Only skip draft preparation for the Payables Agent's own e-documents with agent-driven line matching"
    date: "2026-11-18"
    commit: 090a86dcb619b83faae78367bdab3f5effe14742
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/6125
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/payables-agent
      title: Payables Agent Overview in Business Central
      label: possibly related
      why: Documents Payables Agent processing of vendor invoices with line matching.
      by: model
number: 14148
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/14148
kind: pr
base_branch: main
major: "30"
merged_at: "2026-11-18T09:07:38Z"
author: Explorer986
author_type: User
community_contribution: false
labels:
  - "AL: Apps (W1)"
  - "Team: Finance"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 2
  additions: 98
  deletions: 4
  al: 1
apps:
  - EDocument
objects_touched:
  - key: codeunit/6125
    page: codeunit/6125
    type: codeunit
    id: 6125
    name: Prepare Purchase E-Doc. Draft
    app: EDocument
    status: modified
objects_unjoined: []
obsoletions: []
backports:
  - number: 14415
    base: releases/29.x
    url: https://github.com/microsoft/BCApps/pull/14415
fixes_issues: []
work_items:
  - 653363
systems:
  - integration
quote: null
joined_against:
  major: "30"
  commit: d2abc1d2ceae394331716c8183ef60e1534c2ce0
---

# #14148 Only skip draft preparation for the Payables Agent's own e-documents with agent-driven line matching

> Draft preparation skip now applies only to the Payables Agent's own e-documents when agent-driven line matching is enabled, restoring normal preparation for other e-document services.

[Pull request](https://github.com/microsoft/BCApps/pull/14148) · merged into `main` (BC30) on 2026-11-18 by Explorer986 · 2 files (+98 -4), 1 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- With the agent-driven line matching experiment on, draft preparation is skipped only for e-documents of the AGENT E-Document service
- E-documents from other services, such as PEPPOL XML, again get a vendor, purchase order, line matching and VAT posting group in the draft
- The experiment check and the agent service check are now separate conditions
- Nothing changes when the experiment is off
- AGENT service code duplicated as a label because Payables Agent depends on E-Document Core
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 6125 "Prepare Purchase E-Doc. Draft"](../../objects/codeunit/6125.md), EDocument: modified

## Also merged into

- [#14415](https://github.com/microsoft/BCApps/pull/14415) into `releases/29.x` on 2026-11-24

## Context

- Work items: AB#653363
- Labels: AL: Apps (W1), Team: Finance
- Systems: integration

## Possibly related

No source states these links: they share an object, a model read them, or a person found the same subject.

- [Payables Agent Overview in Business Central](https://learn.microsoft.com/dynamics365/business-central/payables-agent) — possibly related: Documents Payables Agent processing of vendor invoices with line matching. (model-linked)

Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).
