---
id: change/bcapps/10748
type: change
title: "#10748 [SOA] Resolve the current agent's setup instead of an arbitrary one"
summary: The Sales Order Agent now resolves its setup configuration through the current session identity instead of reading arbitrary setup records, ensuring each agent instance uses its own settings for item search and availability filtering.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit soa upgrade
  - page soa multi items availability
  - codeunit soa item search
  - table soa setup
  - codeunit soa session filter
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:07:05.813Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: d9739a77823f95c1443e98431381bde0f817ce62
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/10748
    title: "microsoft/BCApps#10748: [SOA] Resolve the current agent's setup instead of an arbitrary one"
    date: "2026-08-28"
    commit: d9739a77823f95c1443e98431381bde0f817ce62
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/4589
    - object/page/4410
    - object/codeunit/4591
    - object/table/4325
    - object/codeunit/4306
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 10748
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/10748
kind: pr
base_branch: main
major: "30"
merged_at: "2026-08-28T14:04:39Z"
author: qasimikram
author_type: User
community_contribution: false
labels:
  - "AL: Apps (W1)"
  - "Ownership: Manual"
  - "Team: SCM"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 5
  additions: 30
  deletions: 13
  al: 5
apps:
  - SalesOrderAgent
objects_touched:
  - key: codeunit/4589
    page: codeunit/4589
    type: codeunit
    id: 4589
    name: SOA Upgrade
    app: SalesOrderAgent
    status: modified
  - key: page/4410
    page: page/4410
    type: page
    id: 4410
    name: SOA Multi Items Availability
    app: SalesOrderAgent
    status: modified
  - key: codeunit/4591
    page: codeunit/4591
    type: codeunit
    id: 4591
    name: SOA Item Search
    app: SalesOrderAgent
    status: modified
  - key: table/4325
    page: table/4325
    type: table
    id: 4325
    name: SOA Setup
    app: SalesOrderAgent
    status: modified
  - key: codeunit/4306
    page: codeunit/4306
    type: codeunit
    id: 4306
    name: SOA Session Filter
    app: SalesOrderAgent
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 647996
systems:
  - development
quote: null
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #10748 [SOA] Resolve the current agent's setup instead of an arbitrary one

> The Sales Order Agent now resolves its setup configuration through the current session identity instead of reading arbitrary setup records, ensuring each agent instance uses its own settings for item search and availability filtering.

[Pull request](https://github.com/microsoft/BCApps/pull/10748) · merged into `main` (BC30) on 2026-08-28 by qasimikram · 5 files (+30 -13), 5 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Added GetForCurrentAgentSession() method to SOA Setup table to retrieve the setup belonging to the current agent session
- Fixed item search and availability filtering to use the correct agent's configuration instead of arbitrary setup records
- Updated upgrade routines to iterate all setup records instead of only the first one, ensuring every agent receives configuration updates
- Eliminated inconsistencies where different code paths read different setup records during single operations
- Session identity-based filtering aligns this with patterns already used by other SOA components
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 4589 "SOA Upgrade"](../../objects/codeunit/4589.md), SalesOrderAgent: modified
- [Page 4410 "SOA Multi Items Availability"](../../objects/page/4410.md), SalesOrderAgent: modified
- [Codeunit 4591 "SOA Item Search"](../../objects/codeunit/4591.md), SalesOrderAgent: modified
- [Table 4325 "SOA Setup"](../../objects/table/4325.md), SalesOrderAgent: modified
- [Codeunit 4306 "SOA Session Filter"](../../objects/codeunit/4306.md), SalesOrderAgent: modified

## Context

- Work items: AB#647996
- Labels: AL: Apps (W1), Ownership: Manual, Team: SCM
- 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).
