---
id: change/bcapps/10515
type: change
title: "#10515 [Payables Agent] Fix stale Payables Agent setup save"
summary: The Payables Agent Setup now persists instruction updates in a single final modification to prevent stale-record errors when applying agent instructions during setup.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit payables agent setup
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:07:27.278Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 7035ab01066b0c514d9f3dfa9acae46fb3407137
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/10515
    title: "microsoft/BCApps#10515: [Payables Agent] Fix stale Payables Agent setup save"
    date: "2026-08-27"
    commit: 7035ab01066b0c514d9f3dfa9acae46fb3407137
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/3307
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 10515
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/10515
kind: pr
base_branch: main
major: "30"
merged_at: "2026-08-27T15:12:28Z"
author: dayland
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: 1
  additions: 28
  deletions: 14
  al: 1
apps:
  - PayablesAgent
objects_touched:
  - key: codeunit/3307
    page: codeunit/3307
    type: codeunit
    id: 3307
    name: Payables Agent Setup
    app: PayablesAgent
    status: modified
objects_unjoined: []
obsoletions: []
backports:
  - number: 10733
    base: releases/29.x
    url: https://github.com/microsoft/BCApps/pull/10733
fixes_issues: []
work_items:
  - 647307
systems:
  - development
quote: null
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #10515 [Payables Agent] Fix stale Payables Agent setup save

> The Payables Agent Setup now persists instruction updates in a single final modification to prevent stale-record errors when applying agent instructions during setup.

[Pull request](https://github.com/microsoft/BCApps/pull/10515) · merged into `main` (BC30) on 2026-08-27 by dayland · 1 file (+28 -14), 1 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Separated instruction application and hash calculation from immediate setup-record persistence
- Consolidated user ID, E-document service code, and instruction hash updates into one final modification
- Preserved existing hash persistence for upgrade and configuration-drift scenarios
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 3307 "Payables Agent Setup"](../../objects/codeunit/3307.md), PayablesAgent: modified

## Also merged into

- [#10733](https://github.com/microsoft/BCApps/pull/10733) into `releases/29.x` on 2026-09-01

## Context

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

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).
